diff --git a/designer-realize/src/main/java/com/fr/quickeditor/CellQuickEditor.java b/designer-realize/src/main/java/com/fr/quickeditor/CellQuickEditor.java index 82ac101147..088026ba70 100644 --- a/designer-realize/src/main/java/com/fr/quickeditor/CellQuickEditor.java +++ b/designer-realize/src/main/java/com/fr/quickeditor/CellQuickEditor.java @@ -187,7 +187,8 @@ public abstract class CellQuickEditor extends QuickEditor { selectedIndex = comboBox.getSelectedIndex(); comboBox.setPopupVisible(false); comboBox.repaint(); - if (selectedIndex < cellInsertActions.length) { + // comboBox.getSelectedIndex()可能返回-1 + if (selectedIndex != -1 && selectedIndex < cellInsertActions.length) { cellInsertActions[selectedIndex].actionPerformed(e); } comboBox.setSelectedIndex(currentSelectedIndex);