Browse Source

REPORT-4192 切换tab后重命名actio也要重新初始化下

master
kerry 7 years ago
parent
commit
1c734862c4
  1. 9
      designer_form/src/com/fr/design/mainframe/FormHierarchyTreePane.java

9
designer_form/src/com/fr/design/mainframe/FormHierarchyTreePane.java

@ -92,6 +92,7 @@ public class FormHierarchyTreePane extends FormDockView implements HierarchyTree
public void refreshDockingView() { public void refreshDockingView() {
FormDesigner formDesigner = this.getEditingFormDesigner(); FormDesigner formDesigner = this.getEditingFormDesigner();
removeAll(); removeAll();
changeVarNameAction = null;
if(this.componentTree != null) { if(this.componentTree != null) {
this.componentTree.removeAll(); this.componentTree.removeAll();
} }
@ -156,10 +157,10 @@ public class FormHierarchyTreePane extends FormDockView implements HierarchyTree
protected ShortCut4JControlPane[] createShortcuts() { protected ShortCut4JControlPane[] createShortcuts() {
ArrayList<ShortCut4JControlPane> shortCutList = new ArrayList<>(); ArrayList<ShortCut4JControlPane> shortCutList = new ArrayList<>();
FormDesigner designer = getEditingFormDesigner(); FormDesigner designer = getEditingFormDesigner();
if (changeVarNameAction == null) { if (changeVarNameAction == null) {
changeVarNameAction = new ChangeNameAction(designer); changeVarNameAction = new ChangeNameAction(designer);
} }
shortCutList.add(new WidgetEnableShortCut(changeVarNameAction)); shortCutList.add(new WidgetEnableShortCut(changeVarNameAction));
for (Action action : designer.getActions()) { for (Action action : designer.getActions()) {
shortCutList.add(new WidgetEnableShortCut((UndoableAction)action)); shortCutList.add(new WidgetEnableShortCut((UndoableAction)action));
} }

Loading…
Cancel
Save