Viewer and editor selections were not being saved.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31651 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2009-10-16 16:17:52 +00:00
parent 8e02385cea
commit 3d19a3a820

View File

@ -1887,13 +1887,19 @@ void PrefFileformats::updateEditors()
void PrefFileformats::on_viewerCO_currentIndexChanged(int i) void PrefFileformats::on_viewerCO_currentIndexChanged(int i)
{ {
viewerED->setEnabled(viewerCO->itemData(i).toString() == "custom viewer"); bool const custom = viewerCO->itemData(i).toString() == "custom viewer";
viewerED->setEnabled(custom);
if (!custom)
currentFormat().setViewer(fromqstr(viewerCO->itemData(i).toString()));
} }
void PrefFileformats::on_editorCO_currentIndexChanged(int i) void PrefFileformats::on_editorCO_currentIndexChanged(int i)
{ {
editorED->setEnabled(editorCO->itemData(i).toString() == "custom editor"); bool const custom = editorCO->itemData(i).toString() == "custom viewer";
editorED->setEnabled(custom);
if (!custom)
currentFormat().setViewer(fromqstr(editorCO->itemData(i).toString()));
} }