From: Juergen Spitzmueller Date: Sun, 21 Dec 2014 10:47:59 +0000 (+0100) Subject: Do not silently dismiss unapplied document changes when adding module X-Git-Tag: 2.1.3~48 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=cc58d61744a0473f1f2008e1d6796ab74d7a4756;p=features.git Do not silently dismiss unapplied document changes when adding module Part of #9356 --- diff --git a/src/frontends/qt4/GuiDocument.cpp b/src/frontends/qt4/GuiDocument.cpp index 5085792ea0..36a1a0e50b 100644 --- a/src/frontends/qt4/GuiDocument.cpp +++ b/src/frontends/qt4/GuiDocument.cpp @@ -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(); }