revert to using Update()

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70487 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2012-01-31 17:37:31 +00:00
parent a27c36f965
commit 8c7fb50829
3 changed files with 2 additions and 50 deletions

View File

@@ -1284,9 +1284,7 @@ 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
@@ -1427,9 +1425,7 @@ 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
} }
} }
@@ -1455,9 +1451,7 @@ 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
} }
} }
@@ -1491,9 +1485,7 @@ 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;
@@ -2249,9 +2241,7 @@ 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,
@@ -2634,9 +2624,7 @@ 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);
} }

View File

@@ -2301,9 +2301,7 @@ 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
} }
} }
@@ -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->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;
} }
@@ -2471,9 +2464,7 @@ 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
} }
} }
@@ -2515,9 +2506,7 @@ 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
} }
} }
@@ -2533,18 +2522,14 @@ 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)
@@ -2771,9 +2756,7 @@ 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();
@@ -3134,9 +3117,7 @@ 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
} }
} }
} }
@@ -3359,9 +3340,7 @@ 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;
@@ -3398,9 +3377,7 @@ 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;

View File

@@ -2655,12 +2655,7 @@ void wxAuiManager::Update()
if (p.rect != old_pane_rects[i]) if (p.rect != old_pane_rects[i])
{ {
p.window->Refresh(); 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 // 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;
@@ -3412,9 +3405,7 @@ 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();
} }
} }
@@ -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 ) 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