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:
@@ -577,6 +577,9 @@ public:
|
|||||||
wxSize GetHintSize(int dockDirection) const;
|
wxSize GetHintSize(int dockDirection) const;
|
||||||
bool IsPaneValid(const wxAuiPaneInfo& pane) const;
|
bool IsPaneValid(const wxAuiPaneInfo& pane) const;
|
||||||
|
|
||||||
|
// Override to call DoIdleUpdate().
|
||||||
|
virtual void UpdateWindowUI(long flags = wxUPDATE_UI_NONE);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
virtual void OnCustomRender(wxDC& WXUNUSED(dc),
|
virtual void OnCustomRender(wxDC& WXUNUSED(dc),
|
||||||
|
@@ -2338,11 +2338,19 @@ void wxAuiToolBar::OnIdle(wxIdleEvent& evt)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DoIdleUpdate();
|
|
||||||
evt.Skip();
|
evt.Skip();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wxAuiToolBar::UpdateWindowUI(long flags)
|
||||||
|
{
|
||||||
|
if ( flags & wxUPDATE_UI_FROMIDLE )
|
||||||
|
{
|
||||||
|
DoIdleUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
|
wxControl::UpdateWindowUI(flags);
|
||||||
|
}
|
||||||
|
|
||||||
void wxAuiToolBar::OnPaint(wxPaintEvent& WXUNUSED(evt))
|
void wxAuiToolBar::OnPaint(wxPaintEvent& WXUNUSED(evt))
|
||||||
{
|
{
|
||||||
wxAutoBufferedPaintDC dc(this);
|
wxAutoBufferedPaintDC dc(this);
|
||||||
|
Reference in New Issue
Block a user