diff -urp ori-svtools/source/control/tabbar.cxx new-svtools/source/control/tabbar.cxx --- ori-svtools/source/control/tabbar.cxx 2008-03-19 11:06:42.000000000 +0800 +++ new-svtools/source/control/tabbar.cxx 2008-03-19 11:07:52.000000000 +0800 @@ -825,14 +825,37 @@ void TabBar::MouseButtonDown( const Mous return; } + ImplTabBarItem* pItem; + USHORT nSelId = GetPageId( rMEvt.GetPosPixel() ); + if ( !rMEvt.IsLeft() ) { - Window::MouseButtonDown( rMEvt ); + Window::MouseButtonDown( rMEvt ); + if ( nSelId ) + { + if ( nSelId != mnCurPageId ) + { + USHORT nPos = GetPagePos( nSelId ); + pItem = mpItemList->GetObject( nPos ); + + if ( pItem->mbEnable ) + { + if ( ImplDeactivatePage() ) + { + SetCurPageId( nSelId ); + Update(); + ImplActivatePage(); + ImplSelect(); + } + mbInSelect = TRUE; + } + } + } return; } - ImplTabBarItem* pItem; - USHORT nSelId = GetPageId( rMEvt.GetPosPixel() ); + /*ImplTabBarItem* pItem; + USHORT nSelId = GetPageId( rMEvt.GetPosPixel() );*/ if ( rMEvt.IsMod2() && mbAutoEditMode && nSelId ) {