From 3ef12fd203fd3be0944ecdf9c12e6faa33794b29 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Mon, 14 May 2012 17:23:56 +0000 Subject: [PATCH] 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 --- src/richtext/richtextstyles.cpp | 7 +++++++ 1 file changed, 7 insertions(+) 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 -- 2.45.2