From 156d52ff59029542bfc383bb71eee687483ce61e Mon Sep 17 00:00:00 2001 From: Kurt Zenker Date: Thu, 9 Dec 2004 15:12:16 +0000 Subject: [PATCH] INTEGRATION: CWS impress22 (1.2.154); FILE MERGED 2004/12/06 15:52:28 af 1.2.154.1: #i38310# MoveToTop() invalidates the shell stack when it moves a sub shell. --- sd/source/ui/toolpanel/TaskPaneShellManager.cxx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/sd/source/ui/toolpanel/TaskPaneShellManager.cxx b/sd/source/ui/toolpanel/TaskPaneShellManager.cxx index e35b41314aac..e0f768ea0ce7 100644 --- a/sd/source/ui/toolpanel/TaskPaneShellManager.cxx +++ b/sd/source/ui/toolpanel/TaskPaneShellManager.cxx @@ -2,9 +2,9 @@ * * $RCSfile: TaskPaneShellManager.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: rt $ $Date: 2004-07-13 14:36:56 $ + * last change: $Author: kz $ $Date: 2004-12-09 16:12:16 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -106,15 +106,19 @@ void TaskPaneShellManager::RemoveSubShell (SfxShell* pShell) void TaskPaneShellManager::MoveToTop (SfxShell* pShell) { + ViewShellManager::UpdateLocker aLocker (mrViewShellManager); + if (maShellStack.empty() || maShellStack.front()!=pShell) { // Move the given shell to the top of the local stack. - ViewShellManager::UpdateLocker aLocker (mrViewShellManager); - RemoveSubShell (pShell); AddSubShell (pShell); + + mrViewShellManager.InvalidateShellStack(); } - // Move the view shell to the top of the view shell stack. + + // Move the view shell to the top of the view shell stack. This has to + // be done even when the sub shell has not been moved. mrViewShellManager.MoveToTop (&mrViewShell); }