summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-04-29 14:19:36 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-04-29 22:10:54 +0200
commit72ceb3ebb76cbb2888b413464730c15adc4f504b (patch)
tree820849d6341e156caa4d71c4b8df4cad7499017b /svtools
parent754bea8c6a17889f9d4d23bf98847b6b67253220 (diff)
don't run generate preview idle if there are no fonts in the list
and reset preview idle when font list is cleared Change-Id: Ice8c149754fbf64c9f81aa812465f0269de4c9d0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93161 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/control/ctrlbox.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx
index f5ad5df85fe5..fafc2cb02868 100644
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -423,6 +423,8 @@ void FontNameBox::InitFontMRUEntriesFile()
void FontNameBox::ImplDestroyFontList()
{
mpFontList.reset();
+ mnPreviewProgress = 0;
+ maUpdateIdle.Stop();
}
void FontNameBox::Fill( const FontList* pList )
@@ -453,9 +455,9 @@ void FontNameBox::Fill( const FontList* pList )
m_xComboBox->thaw();
- if (mbWYSIWYG)
+ if (mbWYSIWYG && nFontCount)
{
- mnPreviewProgress = 0;
+ assert(mnPreviewProgress == 0 && "ImplDestroyFontList wasn't called");
maUpdateIdle.Start();
}