Browse Source

REPORT-6270 参数面板里的相关bug=>调整代码

plough 7 years ago
parent
commit
a7ce8e87d0
  1. 5
      designer_form/src/com/fr/design/mainframe/FormDesigner.java
  2. 12
      designer_form/src/com/fr/design/mainframe/FormHierarchyTreePane.java

5
designer_form/src/com/fr/design/mainframe/FormDesigner.java

@ -46,7 +46,6 @@ import com.fr.general.ComparatorUtils;
import com.fr.general.FRLogger; import com.fr.general.FRLogger;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import com.fr.stable.CoreGraphHelper;
import com.fr.stable.bridge.StableFactory; import com.fr.stable.bridge.StableFactory;
import javax.swing.*; import javax.swing.*;
@ -148,7 +147,6 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection
new FormDesignerDropTarget(this);// 添加Drag and Drop. new FormDesignerDropTarget(this);// 添加Drag and Drop.
this.switchAction = switchAction; this.switchAction = switchAction;
populateParameterPropertyPane();
} }
/** /**
@ -1013,6 +1011,9 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection
*/ */
@Override @Override
public void valueChanged(TreeSelectionEvent e) { public void valueChanged(TreeSelectionEvent e) {
if (DesignerContext.getDesignerFrame().getSelectedJTemplate() == null) { // 初始化完成前,不响应事件
return;
}
ComponentTree tree = (ComponentTree) e.getSource(); ComponentTree tree = (ComponentTree) e.getSource();
TreePath[] paths = tree.getSelectionPaths(); TreePath[] paths = tree.getSelectionPaths();

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

@ -13,7 +13,6 @@ import com.fr.design.gui.controlpane.ShortCut4JControlPane;
import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.itoolbar.UIToolBarUI; import com.fr.design.gui.itoolbar.UIToolBarUI;
import com.fr.design.gui.itoolbar.UIToolbar; import com.fr.design.gui.itoolbar.UIToolbar;
import com.fr.design.gui.style.BorderPane;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.menu.ShortCut; import com.fr.design.menu.ShortCut;
import com.fr.design.menu.ToolBarDef; import com.fr.design.menu.ToolBarDef;
@ -110,18 +109,11 @@ public class FormHierarchyTreePane extends FormDockView implements HierarchyTree
add(getWidgetPane(), BorderLayout.CENTER); add(getWidgetPane(), BorderLayout.CENTER);
try { // 这里要刷新一下,否则控件树中没有任何一个控件处于选中状态
// 这里要刷新一下,否则控件树中没有任何一个控件处于选中状态 refreshComponentTree();
refreshComponentTree();
} catch (Throwable th) {
// do nothing
}
} }
private void refreshComponentTree() { private void refreshComponentTree() {
if (DesignerContext.getDesignerFrame().getSelectedJTemplate() == null) { // 还在初始化状态
return;
}
componentTree.setAndScrollSelectionPath(componentTree.getSelectedTreePath()); componentTree.setAndScrollSelectionPath(componentTree.getSelectedTreePath());
componentTree.refreshUI(); componentTree.refreshUI();
} }

Loading…
Cancel
Save