diff --git a/designer-realize/src/main/java/com/fr/design/webattr/ToolBarDragPane.java b/designer-realize/src/main/java/com/fr/design/webattr/ToolBarDragPane.java index fc3d813523..a8cd06a9b3 100644 --- a/designer-realize/src/main/java/com/fr/design/webattr/ToolBarDragPane.java +++ b/designer-realize/src/main/java/com/fr/design/webattr/ToolBarDragPane.java @@ -227,6 +227,15 @@ public class ToolBarDragPane extends WidgetToolBarPane { GUICoreUtils.setEnabled(this, b); isEnabled = b; removeAllListener(northToolBar.getToolBarButtons()); + removeAllListener(southToolBar.getToolBarButtons()); + removeToolBarListener(northToolBar); + removeToolBarListener(southToolBar); + } + + private void removeToolBarListener(ToolBarPane toolBarPane) { + if (!isEnabled) { + toolBarPane.removeDefaultMouseListener(); + } } private void removeAllListener(List toolBarButtons) {