Skip to content

Commit

Permalink
Fix wrong quicksave failed warning (#3298)
Browse files Browse the repository at this point in the history
Quicsave always displayed a failed warning, een in success cases.wq
  • Loading branch information
wadoon authored Oct 16, 2023
2 parents 71edf0e + 6623aeb commit 8502ce7
Showing 1 changed file with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,18 @@ public static void quickSave(MainWindow mainWindow) {
if (mainWindow.getMediator().ensureProofLoaded()) {
final String filename = QUICK_SAVE_PATH;
final Proof proof = mainWindow.getMediator().getSelectedProof();
new ProofSaver(proof, filename, KeYConstants.INTERNAL_VERSION).save();
final String status = "File quicksaved: " + filename;
mainWindow.popupWarning(
"Quicksaving file " + filename + " failed:\n" + status,
"Quicksave failed");
LOGGER.debug("Quicksaving file {} failed.", filename, status);

String status = new ProofSaver(proof, filename, KeYConstants.INTERNAL_VERSION).save();

if (status == null) {
// success case
status = "File quicksaved: " + filename;
} else {
mainWindow.popupWarning(
"Quicksaving file " + filename + " failed:\n" + status,
"Quicksave failed");
LOGGER.debug("Quicksaving file {} failed.", filename, status);
}
mainWindow.setStatusLine(status);
LOGGER.debug(status);
} else {
Expand Down

0 comments on commit 8502ce7

Please sign in to comment.