From: Julian Smart Date: Mon, 14 May 2012 17:23:56 +0000 (+0000) Subject: Clear styles popup if there is no style sheet X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/3ef12fd203fd3be0944ecdf9c12e6faa33794b29?hp=34c5aaa7693b073617264bd2a5393cad18cfc300 Clear styles popup if there is no style sheet git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71433 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/richtext/richtextstyles.cpp b/src/richtext/richtextstyles.cpp index cac6a8b1d6..77e1d2abac 100644 --- a/src/richtext/richtextstyles.cpp +++ b/src/richtext/richtextstyles.cpp @@ -666,6 +666,13 @@ void wxRichTextStyleListBox::UpdateStyles() SendSelectedEvent(); } } + else + { + m_styleNames.Clear(); + SetSelection(wxNOT_FOUND); + SetItemCount(0); + Refresh(); + } } // Get index for style name