]> git.lyx.org Git - lyx.git/commitdiff
Viewer and editor selections were not being saved.
authorRichard Heck <rgheck@comcast.net>
Fri, 16 Oct 2009 16:17:52 +0000 (16:17 +0000)
committerRichard Heck <rgheck@comcast.net>
Fri, 16 Oct 2009 16:17:52 +0000 (16:17 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31651 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiPrefs.cpp

index 4d22e3ad1e5901cde13291ef8e8346aba6a76c25..2e187dd39c312f540a1413b737e7fe17abfc3c0d 100644 (file)
@@ -1887,13 +1887,19 @@ void PrefFileformats::updateEditors()
 
 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)
 {
-       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()));
 }