git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45155
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
void wxRichTextStyleComboCtrl::OnIdle(wxIdleEvent& event)
{
void wxRichTextStyleComboCtrl::OnIdle(wxIdleEvent& event)
{
- if (GetRichTextCtrl() && !IsPopupShown() && m_stylePopup && wxWindow::FindFocus() != this)
+ event.Skip();
+
+ if ( !m_stylePopup )
+ return;
+
+ wxRichTextCtrl * const richtext = GetRichTextCtrl();
+ if ( !richtext )
+ return;
+
+ if ( !IsPopupShown() && wxWindow::FindFocus() != this )
- wxString styleName = wxRichTextStyleListBox::GetStyleToShowInIdleTime(GetRichTextCtrl(), m_stylePopup->GetStyleType());
+ wxString styleName =
+ wxRichTextStyleListBox::GetStyleToShowInIdleTime(richtext, m_stylePopup->GetStyleType());
wxString currentValue = GetValue();
if (!styleName.IsEmpty())
wxString currentValue = GetValue();
if (!styleName.IsEmpty())
else if (!currentValue.IsEmpty())
SetValue(wxEmptyString);
}
else if (!currentValue.IsEmpty())
SetValue(wxEmptyString);
}