]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/tabg.cpp
added test mode to wxLongLongWx which allowed to find the bug in operator*=()
[wxWidgets.git] / src / generic / tabg.cpp
index c46ff59cd3cb374d8fecd925d2bd9d9f9c891a19..24fb5c5f1c1c2b8652307ee3a00bfb86cf402b51 100644 (file)
@@ -699,6 +699,7 @@ void wxTabView::ClearTabs(bool deleteTabs)
     layerNode = nextLayerNode;
   }
   m_noTabs = 0;
+  m_tabSelection = -1;
 }
 
 
@@ -875,8 +876,8 @@ bool wxTabView::OnEvent(wxMouseEvent& event)
   if (!event.LeftDown())
     return FALSE;
 
-  long x, y;
-  event.Position(&x, &y);
+  wxCoord x, y;
+  event.GetPosition(&x, &y);
 
   wxTabControl *hitControl = (wxTabControl *) NULL;
 
@@ -1024,6 +1025,9 @@ void wxTabView::SetBackgroundColour(const wxColour& col)
 
 void wxTabView::SetTabSelection(int sel, bool activateTool)
 {
+  if ( sel==m_tabSelection )
+    return;
+
   int oldSel = m_tabSelection;
   wxTabControl *control = FindTabControlForId(sel);
   wxTabControl *oldControl = FindTabControlForId(m_tabSelection);