Browse Source

REPORT-113978 修复保存时UI卡死问题

fbp-1.0
vito 3 months ago
parent
commit
0929b94ded
  1. 7
      designer-base/src/main/java/com/fr/design/data/tabledata/datacenter/DatacentersJSBridge.java

7
designer-base/src/main/java/com/fr/design/data/tabledata/datacenter/DatacentersJSBridge.java

@ -10,6 +10,7 @@ import com.fr.design.dialog.UIDialog;
import com.fr.design.formula.FormulaFactory;
import com.fr.design.formula.UIFormula;
import com.fr.design.jxbrowser.JxUIPane;
import com.fr.design.ui.util.UIUtil;
import com.fr.json.revise.EmbedJson;
import com.fr.locale.InterProviderFactory;
import com.fr.log.FineLoggerFactory;
@ -178,11 +179,11 @@ public class DatacentersJSBridge {
public void okAction() {
CompletableFuture
.runAsync(() -> relationPanel.updateNamePane())
.thenRunAsync(() -> {
.thenRun(() -> {
Window ancestor = SwingUtilities.getWindowAncestor(relationPanel);
if (ancestor instanceof UIDialog) {
try {
((UIDialog) ancestor).doOK();
SwingUtilities.invokeLater(() -> ((UIDialog) ancestor).doOK());
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
@ -195,9 +196,11 @@ public class DatacentersJSBridge {
*/
@JSBridge
public void cancelAction() {
UIUtil.invokeLaterIfNeeded(() -> {
Window ancestor = SwingUtilities.getWindowAncestor(relationPanel);
if (ancestor instanceof UIDialog) {
((UIDialog) ancestor).doCancel();
}
});
}
}

Loading…
Cancel
Save