diff options
Diffstat (limited to 'sw/source/uibase/docvw/AnnotationWin2.cxx')
| -rw-r--r-- | sw/source/uibase/docvw/AnnotationWin2.cxx | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx b/sw/source/uibase/docvw/AnnotationWin2.cxx index f5430214479f..d9ec987b58b9 100644 --- a/sw/source/uibase/docvw/AnnotationWin2.cxx +++ b/sw/source/uibase/docvw/AnnotationWin2.cxx @@ -1332,14 +1332,21 @@ IMPL_LINK( SwAnnotationWin, WindowEventListener, VclWindowEvent&, rEvent, void ) else if ( rEvent.GetId() == VclEventId::WindowActivate && rEvent.GetWindow() == mpSidebarTextControl ) { - const bool bLockView = mrView.GetWrtShell().IsViewLocked(); - mrView.GetWrtShell().LockView( true ); - mrMgr.SetActiveSidebarWin( this ); - mrView.GetWrtShell().LockView( bLockView ); + SetActiveSidebarWin(); mrMgr.MakeVisible( this ); } } +void SwAnnotationWin::SetActiveSidebarWin() +{ + if (mrMgr.GetActiveSidebarWin() == this) + return; + const bool bLockView = mrView.GetWrtShell().IsViewLocked(); + mrView.GetWrtShell().LockView( true ); + mrMgr.SetActiveSidebarWin(this); + mrView.GetWrtShell().LockView( bLockView ); +} + IMPL_LINK(SwAnnotationWin, ScrollHdl, ScrollBar*, pScroll, void) { long nDiff = GetOutlinerView()->GetEditView().GetVisArea().Top() - pScroll->GetThumbPos(); |
