]> git.saurik.com Git - wxWidgets.git/commitdiff
Clear styles popup if there is no style sheet
authorJulian Smart <julian@anthemion.co.uk>
Mon, 14 May 2012 17:23:56 +0000 (17:23 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Mon, 14 May 2012 17:23:56 +0000 (17:23 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71433 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/richtext/richtextstyles.cpp

index cac6a8b1d62c9ae2b57580656ca8bc6745611375..77e1d2abacacd4854b09b539bcdf1b96d094173f 100644 (file)
@@ -666,6 +666,13 @@ void wxRichTextStyleListBox::UpdateStyles()
             SendSelectedEvent();
         }
     }
             SendSelectedEvent();
         }
     }
+    else
+    {
+        m_styleNames.Clear();
+        SetSelection(wxNOT_FOUND);
+        SetItemCount(0);
+        Refresh();
+    }
 }
 
 // Get index for style name
 }
 
 // Get index for style name