Add missing options update at dialog contruction
This commit is contained in:
Juergen Spitzmueller 2023-08-11 11:44:35 +02:00
parent dcde026446
commit 4676a50944

View File

@ -2617,8 +2617,7 @@ void GuiDocument::fontScToggled(bool state)
void GuiDocument::updateExtraOpts() void GuiDocument::updateExtraOpts()
{ {
QString font; QString font = fontModule->fontsRomanCO->getData(
font = fontModule->fontsRomanCO->getData(
fontModule->fontsRomanCO->currentIndex()); fontModule->fontsRomanCO->currentIndex());
bool const rm_opts = providesExtraOpts(font); bool const rm_opts = providesExtraOpts(font);
font = fontModule->fontsSansCO->getData( font = fontModule->fontsSansCO->getData(
@ -2638,8 +2637,7 @@ void GuiDocument::updateExtraOpts()
void GuiDocument::updateFontOptions() void GuiDocument::updateFontOptions()
{ {
QString font; QString font = fontModule->fontsSansCO->getData(
font = fontModule->fontsSansCO->getData(
fontModule->fontsSansCO->currentIndex()); fontModule->fontsSansCO->currentIndex());
bool scalable = providesScale(font); bool scalable = providesScale(font);
fontModule->scaleSansSB->setEnabled(scalable); fontModule->scaleSansSB->setEnabled(scalable);
@ -4466,6 +4464,8 @@ void GuiDocument::paramsToDialog()
sansChanged(fontModule->fontsSansCO->currentIndex()); sansChanged(fontModule->fontsSansCO->currentIndex());
ttChanged(fontModule->fontsTypewriterCO->currentIndex()); ttChanged(fontModule->fontsTypewriterCO->currentIndex());
} }
// Handle options enabling
updateFontOptions();
if (!bp_.fonts_cjk.empty()) if (!bp_.fonts_cjk.empty())
fontModule->cjkFontLE->setText( fontModule->cjkFontLE->setText(