From: Jürgen Spitzmüller Date: Mon, 3 Oct 2005 10:37:28 +0000 (+0000) Subject: fix bug 1894 (disabling of widgets broken) X-Git-Tag: 1.6.10~13868 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=2df2f11f5d6c6f7f6ae1c287f233578ffc0d52fb;p=features.git fix bug 1894 (disabling of widgets broken) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10511 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/frontends/controllers/ChangeLog b/src/frontends/controllers/ChangeLog index 325dcf978d..de28200526 100644 --- a/src/frontends/controllers/ChangeLog +++ b/src/frontends/controllers/ChangeLog @@ -1,3 +1,8 @@ +2005-10-03 Jürgen Spitzmüller + + * Dialog.C (checkStatus): update dialog after checkReadOnly has + enabled all widgets (fixes bug 1894). + 2005-09-15 Jürgen Spitzmüller * ControlDocument.C (dispatchParams): update bufferview at the end diff --git a/src/frontends/controllers/Dialog.C b/src/frontends/controllers/Dialog.C index 039c1c4f16..23b4ad8d27 100644 --- a/src/frontends/controllers/Dialog.C +++ b/src/frontends/controllers/Dialog.C @@ -187,9 +187,14 @@ void Dialog::checkStatus() } // check whether this dialog may be active - if (controller().canApply()) - bc().readOnly(kernel().isBufferReadonly()); - else + if (controller().canApply()) { + bool const readonly = kernel().isBufferReadonly(); + bc().readOnly(readonly); + // refreshReadOnly() is too generous in _enabling_ widgets + // update dialog to disable disabled widgets again + if (!readonly) + view().update(); + } else bc().readOnly(true); }