Browse Source

REPORT-34091 添加判断

feature/big-screen
Henry.Wang 5 years ago
parent
commit
0b5471cc70
  1. 13
      designer-realize/src/main/java/com/fr/quickeditor/cellquick/CellFormulaQuickEditor.java

13
designer-realize/src/main/java/com/fr/quickeditor/cellquick/CellFormulaQuickEditor.java

@ -106,10 +106,15 @@ public class CellFormulaQuickEditor extends CellQuickEditor {
formulaButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
final UIFormula formulaPane = FormulaFactory.createFormulaPaneWhenReserveFormula();
CellSelection cellSelection = (CellSelection)tc.getSelection();
editingCellElement = tc.getEditingElementCase().getTemplateCellElement(cellSelection.getColumn(),cellSelection.getRow());
BaseFormula baseFormula = (BaseFormula) editingCellElement.getValue();
formulaPane.populate(baseFormula);
CellSelection cellSelection = (CellSelection) tc.getSelection();
editingCellElement = tc.getEditingElementCase().getTemplateCellElement(cellSelection.getColumn(), cellSelection.getRow());
Object object = editingCellElement.getValue();
if (object instanceof BaseFormula) {
formulaPane.populate((BaseFormula) object);
} else {
String text = formulaTextField.getText();
formulaPane.populate(BaseFormula.createFormulaBuilder().build(text));
}
formulaPane.showLargeWindow(DesignerContext.getDesignerFrame(), new DialogActionAdapter() {
@Override
public void doOk() {

Loading…
Cancel
Save