Fixed: #1670 Parent component/window of dialogs not properly set

This commit is contained in:
Jindra Petřík
2021-03-27 09:11:00 +01:00
parent b5aee8412b
commit a7989d2d02
45 changed files with 351 additions and 253 deletions

View File

@@ -17,6 +17,7 @@
package com.jpexs.decompiler.flash.gui;
import com.jpexs.decompiler.flash.AbortRetryIgnoreHandler;
import java.awt.Component;
import javax.swing.JOptionPane;
/**
@@ -53,7 +54,12 @@ public class GuiAbortRetryIgnoreHandler implements AbortRetryIgnoreHandler {
msg = "";
}
int result = View.showOptionDialog(null, AppStrings.translate("error.occured").replace("%error%", msg), AppStrings.translate("error"), JOptionPane.YES_NO_OPTION, JOptionPane.ERROR_MESSAGE, null, options, "");
MainFrame mf = Main.getMainFrame();
Component cmp = null;
if (mf != null) {
cmp = mf.getPanel();
}
int result = ViewMessages.showOptionDialog(cmp, AppStrings.translate("error.occured").replace("%error%", msg), AppStrings.translate("error"), JOptionPane.YES_NO_OPTION, JOptionPane.ERROR_MESSAGE, null, options, "");
if (result == AbortRetryIgnoreHandler.IGNORE_ALL) {
ignoreAll = true;
result = AbortRetryIgnoreHandler.IGNORE;