Browse Source

bugfix:单元格元素插入内容,对话框取消之后回到原内容

master
vito 7 years ago
parent
commit
800fb273b1
  1. 4
      designer/src/com/fr/quickeditor/CellQuickEditor.java

4
designer/src/com/fr/quickeditor/CellQuickEditor.java

@ -51,6 +51,8 @@ public abstract class CellQuickEditor extends QuickEditor<ElementCasePane> {
/*占位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<ElementCasePane> {
} 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;

Loading…
Cancel
Save