Reset CategorizedCombo filter when switching between non-TeX and TeX fonts

This commit is contained in:
Juergen Spitzmueller 2020-07-14 15:49:15 +02:00
parent 61cf165521
commit b8969d2e9c
3 changed files with 11 additions and 0 deletions

View File

@ -539,6 +539,11 @@ void CategorizedCombo::reset()
d->model_->clear();
}
void CategorizedCombo::resetFilter()
{
d->resetFilter();
}
void CategorizedCombo::updateCombo()
{

View File

@ -41,6 +41,8 @@ public:
bool set(QString const & cc);
/// Reset the combobox.
void reset();
/// Reset the combobox filter.
void resetFilter();
/// Update combobox.
void updateCombo();
/// Add Item to combo according to sorting settings from preferences

View File

@ -2333,6 +2333,7 @@ void GuiDocument::osFontsChanged(bool nontexfonts)
int const font_sf_scale = fontModule->scaleSansSB->value();
int const font_tt_scale = fontModule->scaleTypewriterSB->value();
// reset the filters
updateFontlist();
// store default format
QString const dformat = outputModule->defaultFormatCO->itemData(
@ -2599,6 +2600,9 @@ void GuiDocument::updateTexFonts()
void GuiDocument::updateFontlist()
{
fontModule->fontsRomanCO->resetFilter();
fontModule->fontsSansCO->resetFilter();
fontModule->fontsTypewriterCO->resetFilter();
fontModule->fontsRomanCO->clear();
fontModule->fontsSansCO->clear();
fontModule->fontsTypewriterCO->clear();