]> git.saurik.com Git - wxWidgets.git/blobdiff - src/aui/auibook.cpp
Remove temporary files created by wxFileName unit test case.
[wxWidgets.git] / src / aui / auibook.cpp
index 32b1401416614f9b95696cb62cfd1fd2a6bfd849..f299944023979d58ee11b40b54a7ada40cff303e 100644 (file)
@@ -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;
@@ -4523,7 +4500,9 @@ bool wxAuiNotebook::SetPageImage(size_t n, int imageId)
 
 wxWindow* wxAuiNotebook::GetCurrentPage () const
 {
-    return GetPage(GetSelection());
+    const int sel = GetSelection();
+
+    return sel == wxNOT_FOUND ? NULL : GetPage(sel);
 }
 
 int wxAuiNotebook::ChangeSelection(size_t n)