diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/management/search/pane/TreeSearchToolbarPane.java b/designer-base/src/main/java/com/fr/design/data/datapane/management/search/pane/TreeSearchToolbarPane.java index ea51e1a821..7524efed2a 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/management/search/pane/TreeSearchToolbarPane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/management/search/pane/TreeSearchToolbarPane.java @@ -156,9 +156,7 @@ public class TreeSearchToolbarPane extends JPanel implements TreeSearchStatusCha returnLabel.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { - searchTextField.setText(StringUtils.EMPTY); TableDataTreeSearchManager.getInstance().outOfSearchMode(); - switchPane(TOOLBAR_PANE); } }); @@ -200,6 +198,11 @@ public class TreeSearchToolbarPane extends JPanel implements TreeSearchStatusCha @Override public void updateTreeSearchChange(TreeSearchStatusChangeEvent event) { TreeSearchStatus treeSearchStatus = event.getTreeSearchStatus(); - switchPane(treeSearchStatus == TreeSearchStatus.NOT_IN_SEARCH_MODE ? TOOLBAR_PANE : SEARCH_PANE); + if (treeSearchStatus == TreeSearchStatus.NOT_IN_SEARCH_MODE) { + this.searchTextField.setText(StringUtils.EMPTY); + switchPane(TOOLBAR_PANE); + } else { + switchPane(SEARCH_PANE); + } } }