From 8c7fb508291f0bc58478ffaec0bcc8f648f01c8b Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Tue, 31 Jan 2012 17:37:31 +0000 Subject: [PATCH] revert to using Update() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70487 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/aui/auibar.cpp | 12 ------------ src/aui/auibook.cpp | 25 +------------------------ src/aui/framemanager.cpp | 15 +-------------- 3 files changed, 2 insertions(+), 50 deletions(-) diff --git a/src/aui/auibar.cpp b/src/aui/auibar.cpp index 9d933d93d6..d9bb3046b4 100644 --- a/src/aui/auibar.cpp +++ b/src/aui/auibar.cpp @@ -1284,9 +1284,7 @@ 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 @@ -1427,9 +1425,7 @@ void wxAuiToolBar::SetHoverItem(wxAuiToolBarItem* pitem) if (former_hover != pitem) { Refresh(false); -#ifdef TODO_REMOVE_IF_NO_PROBLEMS Update(); -#endif } } @@ -1455,9 +1451,7 @@ void wxAuiToolBar::SetPressedItem(wxAuiToolBarItem* pitem) if (former_item != pitem) { Refresh(false); -#ifdef TODO_REMOVE_IF_NO_PROBLEMS Update(); -#endif } } @@ -1491,9 +1485,7 @@ void wxAuiToolBar::RefreshOverflowState() { m_overflowState = overflow_state; Refresh(false); -#ifdef TODO_REMOVE_IF_NO_PROBLEMS Update(); -#endif } m_overflowState = overflow_state; @@ -2249,9 +2241,7 @@ 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, @@ -2634,9 +2624,7 @@ void wxAuiToolBar::OnLeftUp(wxMouseEvent& evt) // repaint immediately Refresh(false); -#ifdef TODO_REMOVE_IF_NO_PROBLEMS Update(); -#endif e.SetInt(toggle); } diff --git a/src/aui/auibook.cpp b/src/aui/auibook.cpp index 32b1401416..beebabff8a 100644 --- a/src/aui/auibook.cpp +++ b/src/aui/auibook.cpp @@ -2301,9 +2301,7 @@ 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 } } @@ -2354,9 +2352,7 @@ void wxAuiTabCtrl::OnLeftUp(wxMouseEvent& evt) } Refresh(); -#ifdef TODO_REMOVE_IF_NO_PROBLEMS Update(); -#endif if (!(m_pressedButton->curState & wxAUI_BUTTON_STATE_DISABLED)) { @@ -2448,18 +2444,15 @@ 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; } @@ -2471,9 +2464,7 @@ void wxAuiTabCtrl::OnMotion(wxMouseEvent& evt) m_hoverButton->curState = wxAUI_BUTTON_STATE_NORMAL; m_hoverButton = NULL; Refresh(); -#ifdef TODO_REMOVE_IF_NO_PROBLEMS Update(); -#endif } } @@ -2515,9 +2506,7 @@ 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 } } @@ -2533,18 +2522,14 @@ 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) @@ -2771,9 +2756,7 @@ 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(); @@ -3134,9 +3117,7 @@ void wxAuiNotebook::SetWindowStyleFlag(long style) tabctrl->SetFlags(m_flags); tabframe->DoSizing(); tabctrl->Refresh(); -#ifdef TODO_REMOVE_IF_NO_PROBLEMS tabctrl->Update(); -#endif } } } @@ -3359,9 +3340,7 @@ 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; @@ -3398,9 +3377,7 @@ 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; diff --git a/src/aui/framemanager.cpp b/src/aui/framemanager.cpp index cefa38376e..24e718d3d3 100644 --- a/src/aui/framemanager.cpp +++ b/src/aui/framemanager.cpp @@ -2655,12 +2655,7 @@ void wxAuiManager::Update() if (p.rect != old_pane_rects[i]) { p.window->Refresh(); - - // under OSX the repaint events occurs almost immediately - // for the other platforms we issue an immediate repaint -#ifndef __WXOSX__ p.window->Update(); -#endif } } } @@ -3342,9 +3337,7 @@ 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; @@ -3412,9 +3405,7 @@ void wxAuiManager::HideHint() if (!m_lastHint.IsEmpty()) { m_frame->Refresh(); -#ifdef TODO_REMOVE_IF_NO_PROBLEMS m_frame->Update(); -#endif m_lastHint = wxRect(); } } @@ -3688,9 +3679,7 @@ 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) @@ -3898,13 +3887,11 @@ void wxAuiManager::Render(wxDC* dc) void wxAuiManager::Repaint(wxDC* dc) { -#ifdef __WXMAC__ */ +#ifdef __WXMAC__ if ( dc == NULL ) { m_frame->Refresh() ; -#ifdef TODO_REMOVE_IF_NO_PROBLEMS m_frame->Update() ; -#endif return ; } #endif -- 2.45.2