attempt to isolate which Update() calls are necessary at all, as they cause performance issues under OSX
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70481 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1284,7 +1284,9 @@ void wxAuiToolBar::SetToolSticky(int tool_id, bool sticky)
|
||||
item->m_sticky = sticky;
|
||||
|
||||
Refresh(false);
|
||||
#ifdef TODO_REMOVE_IF_NO_PROBLEMS
|
||||
Update();
|
||||
#endif
|
||||
}
|
||||
|
||||
bool wxAuiToolBar::GetToolSticky(int tool_id) const
|
||||
@@ -1425,7 +1427,9 @@ void wxAuiToolBar::SetHoverItem(wxAuiToolBarItem* pitem)
|
||||
if (former_hover != pitem)
|
||||
{
|
||||
Refresh(false);
|
||||
#ifdef TODO_REMOVE_IF_NO_PROBLEMS
|
||||
Update();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1451,7 +1455,9 @@ void wxAuiToolBar::SetPressedItem(wxAuiToolBarItem* pitem)
|
||||
if (former_item != pitem)
|
||||
{
|
||||
Refresh(false);
|
||||
#ifdef TODO_REMOVE_IF_NO_PROBLEMS
|
||||
Update();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1485,7 +1491,9 @@ void wxAuiToolBar::RefreshOverflowState()
|
||||
{
|
||||
m_overflowState = overflow_state;
|
||||
Refresh(false);
|
||||
#ifdef TODO_REMOVE_IF_NO_PROBLEMS
|
||||
Update();
|
||||
#endif
|
||||
}
|
||||
|
||||
m_overflowState = overflow_state;
|
||||
@@ -2241,7 +2249,9 @@ void wxAuiToolBar::OnSize(wxSizeEvent& WXUNUSED(evt))
|
||||
m_sizer->SetDimension(0, 0, x, y);
|
||||
|
||||
Refresh(false);
|
||||
#ifdef TODO_REMOVE_IF_NO_PROBLEMS
|
||||
Update();
|
||||
#endif
|
||||
|
||||
// idle events aren't sent while user is resizing frame (why?),
|
||||
// but resizing toolbar here causes havoc,
|
||||
@@ -2624,7 +2634,9 @@ void wxAuiToolBar::OnLeftUp(wxMouseEvent& evt)
|
||||
|
||||
// repaint immediately
|
||||
Refresh(false);
|
||||
#ifdef TODO_REMOVE_IF_NO_PROBLEMS
|
||||
Update();
|
||||
#endif
|
||||
|
||||
e.SetInt(toggle);
|
||||
}
|
||||
|
@@ -2301,7 +2301,9 @@ void wxAuiTabCtrl::OnLeftDown(wxMouseEvent& evt)
|
||||
m_pressedButton = m_hoverButton;
|
||||
m_pressedButton->curState = wxAUI_BUTTON_STATE_PRESSED;
|
||||
Refresh();
|
||||
#ifdef TODO_REMOVE_IF_NO_PROBLEMS
|
||||
Update();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2352,7 +2354,9 @@ void wxAuiTabCtrl::OnLeftUp(wxMouseEvent& evt)
|
||||
}
|
||||
|
||||
Refresh();
|
||||
#ifdef TODO_REMOVE_IF_NO_PROBLEMS
|
||||
Update();
|
||||
#endif
|
||||
|
||||
if (!(m_pressedButton->curState & wxAUI_BUTTON_STATE_DISABLED))
|
||||
{
|
||||
@@ -2444,14 +2448,18 @@ void wxAuiTabCtrl::OnMotion(wxMouseEvent& evt)
|
||||
m_hoverButton->curState = wxAUI_BUTTON_STATE_NORMAL;
|
||||
m_hoverButton = NULL;
|
||||
Refresh();
|
||||
#ifdef TODO_REMOVE_IF_NO_PROBLEMS
|
||||
Update();
|
||||
#endif
|
||||
}
|
||||
|
||||
if (button->curState != wxAUI_BUTTON_STATE_HOVER)
|
||||
{
|
||||
button->curState = wxAUI_BUTTON_STATE_HOVER;
|
||||
Refresh();
|
||||
#ifdef TODO_REMOVE_IF_NO_PROBLEMS
|
||||
Update();
|
||||
#endif
|
||||
m_hoverButton = button;
|
||||
return;
|
||||
}
|
||||
@@ -2463,7 +2471,9 @@ void wxAuiTabCtrl::OnMotion(wxMouseEvent& evt)
|
||||
m_hoverButton->curState = wxAUI_BUTTON_STATE_NORMAL;
|
||||
m_hoverButton = NULL;
|
||||
Refresh();
|
||||
#ifdef TODO_REMOVE_IF_NO_PROBLEMS
|
||||
Update();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2505,7 +2515,9 @@ void wxAuiTabCtrl::OnLeaveWindow(wxMouseEvent& WXUNUSED(event))
|
||||
m_hoverButton->curState = wxAUI_BUTTON_STATE_NORMAL;
|
||||
m_hoverButton = NULL;
|
||||
Refresh();
|
||||
#ifdef TODO_REMOVE_IF_NO_PROBLEMS
|
||||
Update();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2521,14 +2533,18 @@ void wxAuiTabCtrl::OnButton(wxAuiNotebookEvent& event)
|
||||
{
|
||||
SetTabOffset(GetTabOffset()-1);
|
||||
Refresh();
|
||||
#ifdef TODO_REMOVE_IF_NO_PROBLEMS
|
||||
Update();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SetTabOffset(GetTabOffset()+1);
|
||||
Refresh();
|
||||
#ifdef TODO_REMOVE_IF_NO_PROBLEMS
|
||||
Update();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else if (button == wxAUI_BUTTON_WINDOWLIST)
|
||||
@@ -2755,7 +2771,9 @@ public:
|
||||
// TODO: else if (GetFlags() & wxAUI_NB_RIGHT){}
|
||||
|
||||
m_tabs->Refresh();
|
||||
#ifdef TODO_REMOVE_IF_NO_PROBLEMS
|
||||
m_tabs->Update();
|
||||
#endif
|
||||
|
||||
wxAuiNotebookPageArray& pages = m_tabs->GetPages();
|
||||
size_t i, page_count = pages.GetCount();
|
||||
@@ -3116,7 +3134,9 @@ void wxAuiNotebook::SetWindowStyleFlag(long style)
|
||||
tabctrl->SetFlags(m_flags);
|
||||
tabframe->DoSizing();
|
||||
tabctrl->Refresh();
|
||||
#ifdef TODO_REMOVE_IF_NO_PROBLEMS
|
||||
tabctrl->Update();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3339,7 +3359,9 @@ bool wxAuiNotebook::SetPageText(size_t page_idx, const wxString& text)
|
||||
wxAuiNotebookPage& info = ctrl->GetPage(ctrl_idx);
|
||||
info.caption = text;
|
||||
ctrl->Refresh();
|
||||
#ifdef TODO_REMOVE_IF_NO_PROBLEMS
|
||||
ctrl->Update();
|
||||
#endif
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -3376,7 +3398,9 @@ bool wxAuiNotebook::SetPageBitmap(size_t page_idx, const wxBitmap& bitmap)
|
||||
wxAuiNotebookPage& info = ctrl->GetPage(ctrl_idx);
|
||||
info.bitmap = bitmap;
|
||||
ctrl->Refresh();
|
||||
#ifdef TODO_REMOVE_IF_NO_PROBLEMS
|
||||
ctrl->Update();
|
||||
#endif
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@@ -2655,7 +2655,9 @@ void wxAuiManager::Update()
|
||||
if (p.rect != old_pane_rects[i])
|
||||
{
|
||||
p.window->Refresh();
|
||||
#ifdef TODO_REMOVE_IF_NO_PROBLEMS
|
||||
p.window->Update();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3337,7 +3339,9 @@ void wxAuiManager::ShowHint(const wxRect& rect)
|
||||
// remove the last hint rectangle
|
||||
m_lastHint = rect;
|
||||
m_frame->Refresh();
|
||||
#ifdef TODO_REMOVE_IF_NO_PROBLEMS
|
||||
m_frame->Update();
|
||||
#endif
|
||||
}
|
||||
|
||||
wxScreenDC screendc;
|
||||
@@ -3405,7 +3409,9 @@ void wxAuiManager::HideHint()
|
||||
if (!m_lastHint.IsEmpty())
|
||||
{
|
||||
m_frame->Refresh();
|
||||
#ifdef TODO_REMOVE_IF_NO_PROBLEMS
|
||||
m_frame->Update();
|
||||
#endif
|
||||
m_lastHint = wxRect();
|
||||
}
|
||||
}
|
||||
@@ -3679,7 +3685,9 @@ void wxAuiManager::OnFloatingPaneMoving(wxWindow* wnd, wxDirection dir)
|
||||
|
||||
|
||||
// reduces flicker
|
||||
#ifdef TODO_REMOVE_IF_NO_PROBLEMS
|
||||
m_frame->Update();
|
||||
#endif
|
||||
}
|
||||
|
||||
void wxAuiManager::OnFloatingPaneMoved(wxWindow* wnd, wxDirection dir)
|
||||
@@ -3891,7 +3899,9 @@ void wxAuiManager::Repaint(wxDC* dc)
|
||||
if ( dc == NULL )
|
||||
{
|
||||
m_frame->Refresh() ;
|
||||
#ifdef TODO_REMOVE_IF_NO_PROBLEMS
|
||||
m_frame->Update() ;
|
||||
#endif
|
||||
return ;
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user