Browse Source

REPORT-3952 [9.0一轮回归]插入悬浮元素选择插入图表点击取消时会触发保存按钮

master
plough 7 years ago
parent
commit
4ac4dcb252
  1. 9
      designer/src/com/fr/design/actions/insert/flot/ChartFloatAction.java

9
designer/src/com/fr/design/actions/insert/flot/ChartFloatAction.java

@ -30,6 +30,8 @@ import java.awt.*;
*/ */
public class ChartFloatAction extends ElementCaseAction { public class ChartFloatAction extends ElementCaseAction {
private boolean isRecordNeeded;
/** /**
* 构造函数 图表插入悬浮元素 * 构造函数 图表插入悬浮元素
*/ */
@ -64,9 +66,10 @@ public class ChartFloatAction extends ElementCaseAction {
* @return 是则返回true * @return 是则返回true
*/ */
public boolean executeActionReturnUndoRecordNeeded() { public boolean executeActionReturnUndoRecordNeeded() {
isRecordNeeded = false;
final ElementCasePane reportPane = (ElementCasePane) HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().getCurrentElementCasePane(); final ElementCasePane reportPane = (ElementCasePane) HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().getCurrentElementCasePane();
if (reportPane == null) { if (reportPane == null) {
return false; return isRecordNeeded;
} }
reportPane.stopEditing(); reportPane.stopEditing();
@ -78,7 +81,7 @@ public class ChartFloatAction extends ElementCaseAction {
chartDialog.addDialogActionListener(new DialogActionAdapter() { chartDialog.addDialogActionListener(new DialogActionAdapter() {
@Override @Override
public void doOk() { public void doOk() {
isRecordNeeded = true;
FloatElement newFloatElement; FloatElement newFloatElement;
try { try {
newFloatElement = new FloatElement(chartDialog.getChartCollection().clone()); newFloatElement = new FloatElement(chartDialog.getChartCollection().clone());
@ -101,6 +104,6 @@ public class ChartFloatAction extends ElementCaseAction {
}); });
chartDialog.setVisible(true); chartDialog.setVisible(true);
return true; return isRecordNeeded;
} }
} }
Loading…
Cancel
Save