fixed horrible flicker and 100 CPU usage (text ctrl was being updated all the time)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24077 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -200,6 +200,8 @@ protected:
|
|||||||
m_selFrom,
|
m_selFrom,
|
||||||
m_selTo;
|
m_selTo;
|
||||||
|
|
||||||
|
wxString m_range10_20;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// any class wishing to process wxWindows events must use this macro
|
// any class wishing to process wxWindows events must use this macro
|
||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
@@ -632,7 +634,12 @@ void TextWidgetsPage::OnIdle(wxIdleEvent& WXUNUSED(event))
|
|||||||
|
|
||||||
if ( m_textRange )
|
if ( m_textRange )
|
||||||
{
|
{
|
||||||
m_textRange->SetValue(m_text->GetRange(10, 20));
|
wxString range = m_text->GetRange(10, 20);
|
||||||
|
if ( range != m_range10_20 )
|
||||||
|
{
|
||||||
|
m_range10_20 = range;
|
||||||
|
m_textRange->SetValue(range);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user