Ask to save project before open live preview

This commit is contained in:
fgnm
2023-07-19 16:01:25 +02:00
parent 9ee8a07d21
commit ab6aa2f8d7
2 changed files with 2 additions and 2 deletions
@@ -44,7 +44,7 @@ public class UILivePreviewBoxMediator extends Mediator<UILivePreviewBox> {
//TODO
break;
case UILivePreviewBox.LIVE_PREVIEW_CLICKED:
showPreviewWindow();
facade.sendNotification(MsgAPI.CHECK_EDITS_ACTION, (Runnable) this::showPreviewWindow);
break;
default:
break;
@@ -62,6 +62,6 @@ public class SaveProjectDialog extends H2DDialog {
public void updateDialog(String projectTitle, Runnable runnable) {
if (runnable == null) throw new IllegalArgumentException("Runnable action cannot be null");
action = runnable;
messageLabel.setText("Save changes to '" + projectTitle + "' before closing?");
messageLabel.setText("Save changes to '" + projectTitle + "'?");
}
}