]> git.lyx.org Git - features.git/commitdiff
Do not silently dismiss unapplied document changes when adding module
authorJuergen Spitzmueller <spitz@lyx.org>
Sun, 21 Dec 2014 10:47:59 +0000 (11:47 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Thu, 25 Dec 2014 09:45:45 +0000 (10:45 +0100)
Part of #9356

src/frontends/qt4/GuiDocument.cpp

index 5085792ea06bddc19f2d1cc30cd21fe3fc7e112d..36a1a0e50b8636f6ddb92dd15dfaa721526b3275 100644 (file)
@@ -2358,6 +2358,16 @@ void GuiDocument::modulesToParams(BufferParams & bp)
 void GuiDocument::modulesChanged()
 {
        modulesToParams(bp_);
+
+       if (applyPB->isEnabled()) {
+               int const ret = Alert::prompt(_("Unapplied changes"),
+                               _("Some changes in the dialog were not yet applied.\n"
+                               "If you do not apply now, they will be lost after this action."),
+                               1, 1, _("&Apply"), _("&Dismiss"));
+               if (ret == 0)
+                       applyView();
+       }
+
        bp_.makeDocumentClass();
        paramsToDialog();
 }