X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e657520984aaa5445613f54b25f6ee24323e57c5..d728116a27b358e5b002337d96268fb51be128eb:/src/generic/tabg.cpp diff --git a/src/generic/tabg.cpp b/src/generic/tabg.cpp index 2ac60d8afd..bd0ba3d2eb 100644 --- a/src/generic/tabg.cpp +++ b/src/generic/tabg.cpp @@ -20,6 +20,8 @@ #pragma hdrstop #endif +#if wxUSE_TAB_DIALOG + #ifndef WX_PRECOMP #include "wx/wx.h" #endif @@ -699,6 +701,7 @@ void wxTabView::ClearTabs(bool deleteTabs) layerNode = nextLayerNode; } m_noTabs = 0; + m_tabSelection = -1; } @@ -1024,6 +1027,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); @@ -1275,3 +1281,4 @@ void wxPanelTabView::ShowWindowForTab(int id) newWindow->Refresh(); } +#endif // wxUSE_TAB_DIALOG