]> git.lyx.org Git - features.git/commitdiff
fix bug 1894 (disabling of widgets broken)
authorJürgen Spitzmüller <spitz@lyx.org>
Mon, 3 Oct 2005 10:37:28 +0000 (10:37 +0000)
committerJürgen Spitzmüller <spitz@lyx.org>
Mon, 3 Oct 2005 10:37:28 +0000 (10:37 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10511 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/controllers/ChangeLog
src/frontends/controllers/Dialog.C

index 325dcf978d61744d5bf14336a2f27aa1ec7f4fda..de28200526a02bb8f58dd1416f5ec7d12135ba9d 100644 (file)
@@ -1,3 +1,8 @@
+2005-10-03  Jürgen Spitzmüller  <j.spitzmueller@gmx.de>
+
+       * Dialog.C (checkStatus): update dialog after checkReadOnly has
+       enabled all widgets (fixes bug 1894).
+
 2005-09-15  Jürgen Spitzmüller  <j.spitzmueller@gmx.de>
 
        * ControlDocument.C (dispatchParams): update bufferview at the end
index 039c1c4f16b937636db561cbca9f1d692b4b493a..23b4ad8d271e6080f6b96e9208e119bc121533ce 100644 (file)
@@ -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);
 }