From 800fb273b11bb8cd27f6221ea89458fc2b1ee27c Mon Sep 17 00:00:00 2001 From: vito Date: Thu, 24 Aug 2017 15:10:33 +0800 Subject: [PATCH] =?UTF-8?q?bugfix:=E5=8D=95=E5=85=83=E6=A0=BC=E5=85=83?= =?UTF-8?q?=E7=B4=A0=E6=8F=92=E5=85=A5=E5=86=85=E5=AE=B9=EF=BC=8C=E5=AF=B9?= =?UTF-8?q?=E8=AF=9D=E6=A1=86=E5=8F=96=E6=B6=88=E4=B9=8B=E5=90=8E=E5=9B=9E?= =?UTF-8?q?=E5=88=B0=E5=8E=9F=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer/src/com/fr/quickeditor/CellQuickEditor.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/designer/src/com/fr/quickeditor/CellQuickEditor.java b/designer/src/com/fr/quickeditor/CellQuickEditor.java index 9f8ab61d2f..6f0530a70f 100644 --- a/designer/src/com/fr/quickeditor/CellQuickEditor.java +++ b/designer/src/com/fr/quickeditor/CellQuickEditor.java @@ -51,6 +51,8 @@ public abstract class CellQuickEditor extends QuickEditor { /*占位label*/ protected static UILabel emptyLabel = new UILabel(); + private int currentSelectedIndex; + static { emptyLabel.setPreferredSize(new Dimension(60, 20)); } @@ -148,12 +150,14 @@ public abstract class CellQuickEditor extends QuickEditor { } else { comboBox.setSelectedIndex(1); } + currentSelectedIndex = comboBox.getSelectedIndex(); comboBox.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { cellInsertActions = ActionFactory.createCellInsertAction(ElementCasePane.class, tc); selectedIndex = comboBox.getSelectedIndex(); cellInsertActions[selectedIndex].actionPerformed(e); + comboBox.setSelectedIndex(currentSelectedIndex); } }); return comboBox;