Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save in main thread #45

Merged
merged 5 commits into from
Apr 26, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
The tab will now close even if the save (from the save b4 closing
dialog) failed
  • Loading branch information
Andras Toth committed Apr 26, 2018
commit ea3487482802b2358bdc12fdaa79887fdc0db550
Original file line number Diff line number Diff line change
Expand Up @@ -177,20 +177,12 @@ public void doSave(IProgressMonitor monitor) {
});

errorDialog.open(octaneException, "Saving entity failed");

//This will stop the window from closing if an error occurs
//when saving from the dialog that appears when you close a dirty tab
monitor.setCanceled(true);
}

} catch (OperationCanceledException | InterruptedException ignored) {
EntityDetailErrorDialog errorDialog = new EntityDetailErrorDialog(rootComposite.getShell());
errorDialog.addButton("Back", () -> errorDialog.close());
errorDialog.open(new OctaneException(new ErrorModel("Save timeout")), "Saving entity failed");

//This will stop the window from closing if an error occurs
//when saving from the dialog that appears when you close a dirty tab
monitor.setCanceled(true);
}
}

Expand Down