]> git.saurik.com Git - wxWidgets.git/commitdiff
revert to using Update()
authorStefan Csomor <csomor@advancedconcepts.ch>
Tue, 31 Jan 2012 17:37:31 +0000 (17:37 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Tue, 31 Jan 2012 17:37:31 +0000 (17:37 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70487 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/aui/auibar.cpp
src/aui/auibook.cpp
src/aui/framemanager.cpp

index 9d933d93d62121b3b1e4e523ef315f71a1ad117a..d9bb3046b4f268011a79b517ef8901aac82b2880 100644 (file)
@@ -1284,9 +1284,7 @@ void wxAuiToolBar::SetToolSticky(int tool_id, bool sticky)
     item->m_sticky = sticky;
 
     Refresh(false);
     item->m_sticky = sticky;
 
     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
@@ -1427,9 +1425,7 @@ void wxAuiToolBar::SetHoverItem(wxAuiToolBarItem* pitem)
     if (former_hover != pitem)
     {
         Refresh(false);
     if (former_hover != pitem)
     {
         Refresh(false);
-#ifdef TODO_REMOVE_IF_NO_PROBLEMS
         Update();
         Update();
-#endif
     }
 }
 
     }
 }
 
@@ -1455,9 +1451,7 @@ void wxAuiToolBar::SetPressedItem(wxAuiToolBarItem* pitem)
     if (former_item != pitem)
     {
         Refresh(false);
     if (former_item != pitem)
     {
         Refresh(false);
-#ifdef TODO_REMOVE_IF_NO_PROBLEMS
         Update();
         Update();
-#endif
     }
 }
 
     }
 }
 
@@ -1491,9 +1485,7 @@ void wxAuiToolBar::RefreshOverflowState()
     {
         m_overflowState = overflow_state;
         Refresh(false);
     {
         m_overflowState = overflow_state;
         Refresh(false);
-#ifdef TODO_REMOVE_IF_NO_PROBLEMS
         Update();
         Update();
-#endif
     }
 
     m_overflowState = overflow_state;
     }
 
     m_overflowState = overflow_state;
@@ -2249,9 +2241,7 @@ void wxAuiToolBar::OnSize(wxSizeEvent& WXUNUSED(evt))
     m_sizer->SetDimension(0, 0, x, y);
 
     Refresh(false);
     m_sizer->SetDimension(0, 0, x, y);
 
     Refresh(false);
-#ifdef TODO_REMOVE_IF_NO_PROBLEMS
     Update();
     Update();
-#endif
 
     // idle events aren't sent while user is resizing frame (why?),
     // but resizing toolbar here causes havoc,
 
     // 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);
 
                 // repaint immediately
                 Refresh(false);
-#ifdef TODO_REMOVE_IF_NO_PROBLEMS
                 Update();
                 Update();
-#endif
 
                 e.SetInt(toggle);
             }
 
                 e.SetInt(toggle);
             }
index 32b1401416614f9b95696cb62cfd1fd2a6bfd849..beebabff8a74d5f4c13db82daddf23908f80fc6e 100644 (file)
@@ -2301,9 +2301,7 @@ void wxAuiTabCtrl::OnLeftDown(wxMouseEvent& evt)
         m_pressedButton = m_hoverButton;
         m_pressedButton->curState = wxAUI_BUTTON_STATE_PRESSED;
         Refresh();
         m_pressedButton = m_hoverButton;
         m_pressedButton->curState = wxAUI_BUTTON_STATE_PRESSED;
         Refresh();
-#ifdef TODO_REMOVE_IF_NO_PROBLEMS
         Update();
         Update();
-#endif
     }
 }
 
     }
 }
 
@@ -2354,9 +2352,7 @@ 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))
         {
@@ -2448,18 +2444,15 @@ void wxAuiTabCtrl::OnMotion(wxMouseEvent& evt)
             m_hoverButton->curState = wxAUI_BUTTON_STATE_NORMAL;
             m_hoverButton = NULL;
             Refresh();
             m_hoverButton->curState = wxAUI_BUTTON_STATE_NORMAL;
             m_hoverButton = NULL;
             Refresh();
-#ifdef TODO_REMOVE_IF_NO_PROBLEMS
             Update();
             Update();
-#endif
         }
 
         if (button->curState != wxAUI_BUTTON_STATE_HOVER)
         {
             button->curState = wxAUI_BUTTON_STATE_HOVER;
             Refresh();
         }
 
         if (button->curState != wxAUI_BUTTON_STATE_HOVER)
         {
             button->curState = wxAUI_BUTTON_STATE_HOVER;
             Refresh();
-#ifdef TODO_REMOVE_IF_NO_PROBLEMS
             Update();
             Update();
-#endif
+
             m_hoverButton = button;
             return;
         }
             m_hoverButton = button;
             return;
         }
@@ -2471,9 +2464,7 @@ void wxAuiTabCtrl::OnMotion(wxMouseEvent& evt)
             m_hoverButton->curState = wxAUI_BUTTON_STATE_NORMAL;
             m_hoverButton = NULL;
             Refresh();
             m_hoverButton->curState = wxAUI_BUTTON_STATE_NORMAL;
             m_hoverButton = NULL;
             Refresh();
-#ifdef TODO_REMOVE_IF_NO_PROBLEMS
             Update();
             Update();
-#endif
         }
     }
 
         }
     }
 
@@ -2515,9 +2506,7 @@ void wxAuiTabCtrl::OnLeaveWindow(wxMouseEvent& WXUNUSED(event))
         m_hoverButton->curState = wxAUI_BUTTON_STATE_NORMAL;
         m_hoverButton = NULL;
         Refresh();
         m_hoverButton->curState = wxAUI_BUTTON_STATE_NORMAL;
         m_hoverButton = NULL;
         Refresh();
-#ifdef TODO_REMOVE_IF_NO_PROBLEMS
         Update();
         Update();
-#endif
     }
 }
 
     }
 }
 
@@ -2533,18 +2522,14 @@ void wxAuiTabCtrl::OnButton(wxAuiNotebookEvent& event)
             {
                 SetTabOffset(GetTabOffset()-1);
                 Refresh();
             {
                 SetTabOffset(GetTabOffset()-1);
                 Refresh();
-#ifdef TODO_REMOVE_IF_NO_PROBLEMS
                 Update();
                 Update();
-#endif
             }
         }
         else
         {
             SetTabOffset(GetTabOffset()+1);
             Refresh();
             }
         }
         else
         {
             SetTabOffset(GetTabOffset()+1);
             Refresh();
-#ifdef TODO_REMOVE_IF_NO_PROBLEMS
             Update();
             Update();
-#endif
         }
     }
     else if (button == wxAUI_BUTTON_WINDOWLIST)
         }
     }
     else if (button == wxAUI_BUTTON_WINDOWLIST)
@@ -2771,9 +2756,7 @@ public:
         // TODO: else if (GetFlags() & wxAUI_NB_RIGHT){}
 
         m_tabs->Refresh();
         // TODO: else if (GetFlags() & wxAUI_NB_RIGHT){}
 
         m_tabs->Refresh();
-#ifdef TODO_REMOVE_IF_NO_PROBLEMS
         m_tabs->Update();
         m_tabs->Update();
-#endif
 
         wxAuiNotebookPageArray& pages = m_tabs->GetPages();
         size_t i, page_count = pages.GetCount();
 
         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();
             tabctrl->SetFlags(m_flags);
             tabframe->DoSizing();
             tabctrl->Refresh();
-#ifdef TODO_REMOVE_IF_NO_PROBLEMS
             tabctrl->Update();
             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();
         wxAuiNotebookPage& info = ctrl->GetPage(ctrl_idx);
         info.caption = text;
         ctrl->Refresh();
-#ifdef TODO_REMOVE_IF_NO_PROBLEMS
         ctrl->Update();
         ctrl->Update();
-#endif
     }
 
     return true;
     }
 
     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();
         wxAuiNotebookPage& info = ctrl->GetPage(ctrl_idx);
         info.bitmap = bitmap;
         ctrl->Refresh();
-#ifdef TODO_REMOVE_IF_NO_PROBLEMS
         ctrl->Update();
         ctrl->Update();
-#endif
     }
 
     return true;
     }
 
     return true;
index cefa38376eeb40db87d27dc78fd1e88453616c70..24e718d3d34dd1d69f606f292f31f494c7a893bc 100644 (file)
@@ -2655,12 +2655,7 @@ void wxAuiManager::Update()
             if (p.rect != old_pane_rects[i])
             {
                 p.window->Refresh();
             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();
                 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();
             // remove the last hint rectangle
             m_lastHint = rect;
             m_frame->Refresh();
-#ifdef TODO_REMOVE_IF_NO_PROBLEMS
             m_frame->Update();
             m_frame->Update();
-#endif
         }
 
         wxScreenDC screendc;
         }
 
         wxScreenDC screendc;
@@ -3412,9 +3405,7 @@ void wxAuiManager::HideHint()
     if (!m_lastHint.IsEmpty())
     {
         m_frame->Refresh();
     if (!m_lastHint.IsEmpty())
     {
         m_frame->Refresh();
-#ifdef TODO_REMOVE_IF_NO_PROBLEMS
         m_frame->Update();
         m_frame->Update();
-#endif
         m_lastHint = wxRect();
     }
 }
         m_lastHint = wxRect();
     }
 }
@@ -3688,9 +3679,7 @@ 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)
@@ -3898,13 +3887,11 @@ void wxAuiManager::Render(wxDC* dc)
 
 void wxAuiManager::Repaint(wxDC* dc)
 {
 
 void wxAuiManager::Repaint(wxDC* dc)
 {
-#ifdef __WXMAC__ */
+#ifdef __WXMAC__ 
     if ( dc == NULL )
     {
         m_frame->Refresh() ;
     if ( dc == NULL )
     {
         m_frame->Refresh() ;
-#ifdef TODO_REMOVE_IF_NO_PROBLEMS
         m_frame->Update() ;
         m_frame->Update() ;
-#endif
         return ;
     }
 #endif
         return ;
     }
 #endif