Browse Source

Merge pull request #1471 in BA/design from ~YAOH.WU/a_design_0811:release/9.0 to release/9.0

* commit '3cbb7ba376ccc971e8f56f53cf078a0d0201e0b6':
  默认模板启动问题
master
superman 7 years ago
parent
commit
2fa522d920
  1. 47
      designer/src/com/fr/quickeditor/CellQuickEditor.java

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

@ -165,38 +165,37 @@ public abstract class CellQuickEditor extends QuickEditor<ElementCasePane> {
columnRowTextField.setText(columnRow.toString());
cellElement = tc.getEditingElementCase().getTemplateCellElement(cs.getColumn(), cs.getRow());
comboBox.removeActionListener(comboBoxActionListener);
comboBox.removeAllItems();
JTemplate jTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate();
if (jTemplate != null) {
comboBox.removeActionListener(comboBoxActionListener);
comboBox.removeAllItems();
String[] items = getDefaultComboBoxItems();
for (String item : items) {
comboBox.addItem(item);
}
}
Object comboBoxSelected = getComboBoxSelected();
if (comboBoxSelected != null) {
comboBox.setSelectedItem(((ShortCut) comboBoxSelected).getMenuKeySet().getMenuKeySetName());
} else {
comboBox.setSelectedIndex(1);
}
currentSelectedIndex = comboBox.getSelectedIndex();
comboBoxActionListener = new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
cellInsertActions = ActionFactory.createCellInsertAction(ElementCasePane.class, tc);
selectedIndex = comboBox.getSelectedIndex();
comboBox.setPopupVisible(false);
comboBox.repaint();
if (selectedIndex < cellInsertActions.length) {
cellInsertActions[selectedIndex].actionPerformed(e);
}
comboBox.setSelectedIndex(currentSelectedIndex);
Object comboBoxSelected = getComboBoxSelected();
if (comboBoxSelected != null) {
comboBox.setSelectedItem(((ShortCut) comboBoxSelected).getMenuKeySet().getMenuKeySetName());
} else {
comboBox.setSelectedIndex(1);
}
};
comboBox.addActionListener(comboBoxActionListener);
currentSelectedIndex = comboBox.getSelectedIndex();
comboBoxActionListener = new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
cellInsertActions = ActionFactory.createCellInsertAction(ElementCasePane.class, tc);
selectedIndex = comboBox.getSelectedIndex();
comboBox.setPopupVisible(false);
comboBox.repaint();
if (selectedIndex < cellInsertActions.length) {
cellInsertActions[selectedIndex].actionPerformed(e);
}
comboBox.setSelectedIndex(currentSelectedIndex);
}
};
comboBox.addActionListener(comboBoxActionListener);
}
refreshDetails();
}
/**

Loading…
Cancel
Save