mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
modality issues
This commit is contained in:
+12
-5
@@ -103,11 +103,18 @@ public abstract class AbstractUpdateDialog extends DialogWrapper {
|
||||
protected void doOKAction() {
|
||||
if (doDownloadAndPrepare() && isShowConfirmation()) {
|
||||
final ApplicationEx app = ApplicationManagerEx.getApplicationEx();
|
||||
if (app.isRestartCapable()) {
|
||||
app.restart();
|
||||
} else {
|
||||
app.exit(true);
|
||||
}
|
||||
// do not stack several modal dialogs (native & swing)
|
||||
app.invokeLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (app.isRestartCapable()) {
|
||||
app.restart();
|
||||
}
|
||||
else {
|
||||
app.exit(true);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
super.doOKAction();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user