You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by or...@apache.org on 2013/03/08 15:33:00 UTC
svn commit: r1454404 -
/openoffice/branches/sidebar/main/svx/source/sidebar/tools/Popup.cxx
Author: orw
Date: Fri Mar 8 14:33:00 2013
New Revision: 1454404
URL: http://svn.apache.org/r1454404
Log:
#121420# - svx::sidebar::Popup::Show(..) - do not show, if already visible
Modified:
openoffice/branches/sidebar/main/svx/source/sidebar/tools/Popup.cxx
Modified: openoffice/branches/sidebar/main/svx/source/sidebar/tools/Popup.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/svx/source/sidebar/tools/Popup.cxx?rev=1454404&r1=1454403&r2=1454404&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/svx/source/sidebar/tools/Popup.cxx (original)
+++ openoffice/branches/sidebar/main/svx/source/sidebar/tools/Popup.cxx Fri Mar 8 14:33:00 2013
@@ -66,21 +66,24 @@ void Popup::Show (ToolBox& rToolBox)
OSL_ASSERT(mpControl);
return;
}
-
- mpContainer->SetSizePixel(mpControl->GetOutputSizePixel());
- const Point aPos (mpParent->OutputToScreenPixel(rToolBox.GetPosPixel()));
- const Size aSize (rToolBox.GetSizePixel());
- const Rectangle aRect (aPos, aSize);
-
- mpContainer->StartPopupMode(
- aRect,
- FLOATWIN_POPUPMODE_NOFOCUSCLOSE|FLOATWIN_POPUPMODE_DOWN);
- mpContainer->SetPopupModeFlags(
- mpContainer->GetPopupModeFlags()
- | FLOATWIN_POPUPMODE_NOAPPFOCUSCLOSE);
-
- mpControl->GetFocus();
+ if ( !mpContainer->IsInPopupMode() )
+ {
+ mpContainer->SetSizePixel(mpControl->GetOutputSizePixel());
+
+ const Point aPos (mpParent->OutputToScreenPixel(rToolBox.GetPosPixel()));
+ const Size aSize (rToolBox.GetSizePixel());
+ const Rectangle aRect (aPos, aSize);
+
+ mpContainer->StartPopupMode(
+ aRect,
+ FLOATWIN_POPUPMODE_NOFOCUSCLOSE|FLOATWIN_POPUPMODE_DOWN);
+ mpContainer->SetPopupModeFlags(
+ mpContainer->GetPopupModeFlags()
+ | FLOATWIN_POPUPMODE_NOAPPFOCUSCLOSE);
+
+ mpControl->GetFocus();
+ }
}