Browse Source

REPORT-34351 修正FineJOptionPane组件showInputDialog()方法点击弹出框的取消键后的行为;在组件重命名后将与自己的原来的名字进行对比的情况去除

feature/big-screen
Yuan.Wang 4 years ago
parent
commit
e5b6183729
  1. 6
      designer-base/src/main/java/com/fr/design/dialog/FineJOptionPane.java
  2. 2
      designer-realize/src/main/java/com/fr/design/mainframe/SheetNameTabPane.java

6
designer-base/src/main/java/com/fr/design/dialog/FineJOptionPane.java

@ -1,6 +1,7 @@
package com.fr.design.dialog;
import com.fr.invoke.Reflect;
import com.fr.stable.StringUtils;
import javax.swing.Icon;
import javax.swing.JDialog;
@ -279,8 +280,11 @@ public class FineJOptionPane extends JOptionPane {
dialog.show();
dialog.dispose();
Object value = pane.getInputValue();
//点击取消按钮,返回null
if (StringUtils.equals((String) pane.getValue(), OPTION_OK_CANCEL[1]))
return null;
Object value = pane.getInputValue();
if (value == UNINITIALIZED_VALUE) {
return null;
}

2
designer-realize/src/main/java/com/fr/design/mainframe/SheetNameTabPane.java

@ -945,7 +945,7 @@ public class SheetNameTabPane extends JComponent implements MouseListener, Mouse
// marks:判断是否重名
boolean isExisted = false;
for (int i = 0; i < reportComposite.getEditingWorkBook().getReportCount(); i++) {
if (newName.equalsIgnoreCase(reportComposite.getEditingWorkBook().getReportName(i))) {
if (newName.equalsIgnoreCase(reportComposite.getEditingWorkBook().getReportName(i)) && i != selectedIndex) {
isExisted = true;
break;
}

Loading…
Cancel
Save