Browse Source

REPORT-3163 合作开发9.0设计器=>新列表面板=》修复点击空白处也弹出编辑框的bug

master
plough 7 years ago
parent
commit
d26b8c1a56
  1. 6
      designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java

6
designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java

@ -358,8 +358,8 @@ public abstract class UIListControlPane extends UIControlPane {
} }
} }
private void popupEditPane() { private void popupEditPane(Point mousePos) {
if (editingIndex < 0) { if (editingIndex < 0 || !nameableList.getCellBounds(editingIndex, editingIndex).contains(mousePos)) {
return; return;
} }
GUICoreUtils.showPopupMenu(popupEditPane, this, GUICoreUtils.showPopupMenu(popupEditPane, this,
@ -669,7 +669,7 @@ public abstract class UIListControlPane extends UIControlPane {
nameableList.editItemAt(nameableList.getSelectedIndex()); nameableList.editItemAt(nameableList.getSelectedIndex());
} else if (SwingUtilities.isLeftMouseButton(evt) && evt.getX() <= EDIT_RANGE) { } else if (SwingUtilities.isLeftMouseButton(evt) && evt.getX() <= EDIT_RANGE) {
editingIndex = nameableList.getSelectedIndex(); editingIndex = nameableList.getSelectedIndex();
popupEditPane(); popupEditPane(evt.getPoint());
} }
// peter:处理右键的弹出菜单 // peter:处理右键的弹出菜单

Loading…
Cancel
Save