X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f03fc89fff2d6e823e7d4d14fbe14822ad6777b1..7b9da2077d0975db6c965a85c91d5aca671ab5e3:/src/generic/tabg.cpp diff --git a/src/generic/tabg.cpp b/src/generic/tabg.cpp index c46ff59cd3..24fb5c5f1c 100644 --- a/src/generic/tabg.cpp +++ b/src/generic/tabg.cpp @@ -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);