Browse Source

Pull request #5087: REPORT-55228 ctrl/shift多选时不出现工具栏 + 老插件管理工具栏不显示

Merge in DESIGN/design from ~HADES/design:final/10.0 to final/10.0

* commit 'bd2f4287505d9668dc7f1f634ef13bc1b892f6f2':
  REPORT-55228 ctrl/shift多选时不出现工具栏 + 老插件管理工具栏不显示
final/10.0
Kara 3 years ago
parent
commit
2e577b9af2
  1. 2
      designer-base/src/main/java/com/fr/design/extra/PluginWebBridge.java
  2. 6
      designer-form/src/main/java/com/fr/design/mainframe/ComponentTree.java
  3. 2
      designer-form/src/main/java/com/fr/design/mainframe/EditingMouseListener.java
  4. 5
      designer-form/src/main/java/com/fr/design/mainframe/FormCreatorDropTarget.java

2
designer-base/src/main/java/com/fr/design/extra/PluginWebBridge.java

@ -399,6 +399,8 @@ public class PluginWebBridge {
if (uiDialog != null) { if (uiDialog != null) {
uiDialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); uiDialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
uiDialog.setVisible(false); uiDialog.setVisible(false);
}
if (uiDialog == DesignerPluginContext.getPluginDialog()) {
DesignerPluginContext.setPluginDialog(null); DesignerPluginContext.setPluginDialog(null);
} }
} }

6
designer-form/src/main/java/com/fr/design/mainframe/ComponentTree.java

@ -408,6 +408,9 @@ public class ComponentTree extends JTree {
@Override @Override
public void mouseReleased(MouseEvent e) { public void mouseReleased(MouseEvent e) {
if (e.isControlDown() || e.isShiftDown()) {
return;
}
if (e.getButton() == MouseEvent.BUTTON1 && selectedCreator != null) { if (e.getButton() == MouseEvent.BUTTON1 && selectedCreator != null) {
showSelectedPopup(selectedCreator); showSelectedPopup(selectedCreator);
} }
@ -426,6 +429,9 @@ public class ComponentTree extends JTree {
* @param consumer * @param consumer
*/ */
private void onMouseEvent(final MouseEvent e, Consumer<XCreator> consumer) { private void onMouseEvent(final MouseEvent e, Consumer<XCreator> consumer) {
if (e.isControlDown() || e.isShiftDown()) {
return;
}
Point p = e.getPoint(); Point p = e.getPoint();
// 解析组件树路径 获取选中的组件 // 解析组件树路径 获取选中的组件
int selRow = tree.getRowForLocation(p.x, p.y); int selRow = tree.getRowForLocation(p.x, p.y);

2
designer-form/src/main/java/com/fr/design/mainframe/EditingMouseListener.java

@ -647,7 +647,7 @@ public class EditingMouseListener extends MouseInputAdapter {
@Override @Override
public void run() { public void run() {
for (XCreator xCreator : xCreators) { for (XCreator xCreator : xCreators) {
xCreator.setSelected(!e.isShiftDown()); xCreator.setSelected(!e.isShiftDown() && !e.isControlDown());
} }
} }
}); });

5
designer-form/src/main/java/com/fr/design/mainframe/FormCreatorDropTarget.java

@ -145,6 +145,11 @@ public class FormCreatorDropTarget extends DropTarget {
tabDragInner.tryDragIn(); tabDragInner.tryDragIn();
} else { } else {
Toolkit.getDefaultToolkit().beep(); Toolkit.getDefaultToolkit().beep();
// 拖入失败 取消选中
XCreator creator = addingModel.getXCreator();
if (creator != null) {
creator.setSelected(false);
}
} }
// 取消提示 // 取消提示
designer.setPainter(null); designer.setPainter(null);

Loading…
Cancel
Save