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