Browse Source

REPORT-58535 【稳定共创】附件模板概率出现2个编辑按钮

final/10.0
hades 3 years ago
parent
commit
70847a3057
  1. 18
      designer-form/src/main/java/com/fr/design/mainframe/EditingMouseListener.java

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

@ -36,6 +36,7 @@ import com.fr.design.utils.gui.LayoutUtils;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.stable.Constants; import com.fr.stable.Constants;
import com.fr.third.org.apache.commons.lang3.ArrayUtils;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
import javax.swing.JComponent; import javax.swing.JComponent;
import javax.swing.JPopupMenu; import javax.swing.JPopupMenu;
@ -645,16 +646,15 @@ public class EditingMouseListener extends MouseInputAdapter {
selectionModel.selectACreatorAtMouseEvent(e); selectionModel.selectACreatorAtMouseEvent(e);
refreshTopXCreator(); refreshTopXCreator();
XCreator[] xCreators = selectionModel.getSelection().getSelectedCreators(); XCreator[] xCreators = selectionModel.getSelection().getSelectedCreators();
// 放到事件队尾执行 if (ArrayUtils.getLength(xCreators) == 1) {
SwingUtilities.invokeLater(new Runnable() { // 放到事件队尾执行
@Override SwingUtilities.invokeLater(new Runnable() {
public void run() { @Override
for (XCreator xCreator : xCreators) { public void run() {
xCreator.setSelected(!e.isShiftDown() && !e.isControlDown()); xCreators[0].setSelected(!e.isShiftDown() && !e.isControlDown());
} }
} });
}); }
} else if (clickedNonCardButton && uneditedTab && responseTabLayout(oldCreator, e)) { } else if (clickedNonCardButton && uneditedTab && responseTabLayout(oldCreator, e)) {
// do nothing // do nothing
} else { } else {

Loading…
Cancel
Save