X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3f239e37605aa38b26b3954565b865600a4152aa..96b2cbe8b39292fed91654ff0d1f4b1c16561acb:/src/richtext/richtextstyles.cpp diff --git a/src/richtext/richtextstyles.cpp b/src/richtext/richtextstyles.cpp index a171a8b60a..0ce957ad79 100644 --- a/src/richtext/richtextstyles.cpp +++ b/src/richtext/richtextstyles.cpp @@ -756,7 +756,7 @@ wxString wxRichTextStyleListBox::GetStyleToShowInIdleTime(wxRichTextCtrl* ctrl, /// Auto-select from style under caret in idle time void wxRichTextStyleListBox::OnIdle(wxIdleEvent& event) { - if (CanAutoSetSelection() && GetRichTextCtrl() && wxWindow::FindFocus() != this) + if (CanAutoSetSelection() && GetRichTextCtrl() && IsShownOnScreen() && wxWindow::FindFocus() != this) { wxString styleName = GetStyleToShowInIdleTime(GetRichTextCtrl(), GetStyleType()); @@ -1114,7 +1114,7 @@ void wxRichTextStyleComboCtrl::OnIdle(wxIdleEvent& event) if ( !richtext ) return; - if ( !IsPopupShown() && wxWindow::FindFocus() != this ) + if ( !IsPopupShown() && IsShownOnScreen() && wxWindow::FindFocus() != this ) { wxString styleName = wxRichTextStyleListBox::GetStyleToShowInIdleTime(richtext, m_stylePopup->GetStyleType());