fix bug 1894 (disabling of widgets broken)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10511 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Spitzmüller 2005-10-03 10:37:28 +00:00
parent 66d2b93f7c
commit 2df2f11f5d
2 changed files with 13 additions and 3 deletions

View 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

View 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);
}