Perform wxAuiToolBar idle updates from UpdateWindowUI(), not OnIdle().

No real changes, just optimize the idle updates by doing it from (less often
called) UpdateWindowUI() instead of EVT_IDLE handler.

Closes #10075.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69594 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2011-10-30 16:51:10 +00:00
parent f5fccd52d4
commit 3ac17397c5
2 changed files with 13 additions and 2 deletions

View File

@@ -577,6 +577,9 @@ public:
wxSize GetHintSize(int dockDirection) const;
bool IsPaneValid(const wxAuiPaneInfo& pane) const;
// Override to call DoIdleUpdate().
virtual void UpdateWindowUI(long flags = wxUPDATE_UI_NONE);
protected:
virtual void OnCustomRender(wxDC& WXUNUSED(dc),

View File

@@ -2338,11 +2338,19 @@ void wxAuiToolBar::OnIdle(wxIdleEvent& evt)
}
}
}
DoIdleUpdate();
evt.Skip();
}
void wxAuiToolBar::UpdateWindowUI(long flags)
{
if ( flags & wxUPDATE_UI_FROMIDLE )
{
DoIdleUpdate();
}
wxControl::UpdateWindowUI(flags);
}
void wxAuiToolBar::OnPaint(wxPaintEvent& WXUNUSED(evt))
{
wxAutoBufferedPaintDC dc(this);