]> 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>
Sun, 21 Dec 2014 10:47:59 +0000 (11:47 +0100)
Part of #9356

src/frontends/qt4/GuiDocument.cpp

index 039720cdaefee5d7eaa6d2bc2cc00a5bb471d2ef..ec0ffcaa70cfb6fe06203e18441cb7a4637e0a6c 100644 (file)
@@ -2377,6 +2377,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();
 }