From 276fa4825dcfadb897cdee862f6902e3c1753443 Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Sun, 21 Dec 2014 11:47:59 +0100 Subject: [PATCH] Do not silently dismiss unapplied document changes when adding module Part of #9356 --- src/frontends/qt4/GuiDocument.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/frontends/qt4/GuiDocument.cpp b/src/frontends/qt4/GuiDocument.cpp index 039720cdae..ec0ffcaa70 100644 --- a/src/frontends/qt4/GuiDocument.cpp +++ b/src/frontends/qt4/GuiDocument.cpp @@ -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(); } -- 2.39.5