Ask to save project before open live preview
This commit is contained in:
+1
-1
@@ -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 + "'?");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user