Fix the enabling/disabling of the custom latex font encoding lineedit.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34694 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Vincent van Ravesteijn 2010-06-25 03:33:15 +00:00
parent f616126668
commit fb99c8115a

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