]> git.lyx.org Git - lyx.git/commitdiff
Fix the enabling/disabling of the custom latex font encoding lineedit.
authorVincent van Ravesteijn <vfr@lyx.org>
Fri, 25 Jun 2010 03:33:15 +0000 (03:33 +0000)
committerVincent van Ravesteijn <vfr@lyx.org>
Fri, 25 Jun 2010 03:33:15 +0000 (03:33 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34694 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiDocument.cpp

index 693bd57be43bc4be9f1a487a45afc867e0572afb..8c71cf93c2d58b5ce23c1eeedddd0846a90b55d9 100644 (file)
@@ -1525,7 +1525,10 @@ void GuiDocument::xetexChanged(bool xetex)
        
        fontModule->fontencLA->setEnabled(!xetex);
        fontModule->fontencCO->setEnabled(!xetex);
-       fontModule->fontencLE->setEnabled(!xetex);
+       if (xetex)
+               fontModule->fontencLE->setEnabled(false);
+       else
+               fontencChanged(fontModule->fontencCO->currentIndex());
 }
 
 
@@ -2788,11 +2791,13 @@ void GuiDocument::paramsToDialog()
        if (nn >= 0)
                fontModule->fontsDefaultCO->setCurrentIndex(nn);
 
-       if (bp_.fontenc == "global")
+       if (bp_.fontenc == "global") {
                fontModule->fontencCO->setCurrentIndex(0);
-       else if (bp_.fontenc == "default")
+               fontModule->fontencLE->setEnabled(false);
+       } else if (bp_.fontenc == "default") {
                fontModule->fontencCO->setCurrentIndex(2);
-       else {
+               fontModule->fontencLE->setEnabled(false);
+       } else {
                fontModule->fontencCO->setCurrentIndex(1);
                fontModule->fontencLE->setText(toqstr(bp_.fontenc));
        }