[Libreoffice-bugs] [Bug 39268] UI: Drawing tools should not switch back to Selection tool
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Fri Jul 15 11:53:19 PDT 2011
https://bugs.freedesktop.org/show_bug.cgi?id=39268
--- Comment #1 from Federico Mena-Quintero <federico at ximian.com> 2011-07-15 11:53:19 PDT ---
It seems that most tools (impress/sd/source/ui/func/fucon*.cxx) have a snippet
like this in their ::MouseButtonUp() methods:
if (!bPermanent)
mpViewShell->GetViewFrame()->GetDispatcher()->Execute(SID_OBJECT_SELECT,
SFX_CALLMODE_ASYNCHRON);
In turn, that "bPermanent" comes from an argument passed to ::Create().
As far as I can tell, that argument comes from
impress/sd/source/ui/view/drviewse.cxx - it calls various things like
SetCurrentFunction( FuConstructArc::Create( this, GetActiveWindow(),
mpDrawView, GetDoc(), rReq, bPermanent) );
depending on the current tool.
That bPermanent comes from this mysterious bit from
DrawViewShell::FuPermanent():
sal_Bool bPermanent = sal_False;
... much later ...
if( HasCurrentFunction() )
{
nOldSId = GetCurrentFunction()->GetSlotID();
if (nOldSId == nSId ||
((nOldSId == SID_TEXTEDIT || nOldSId == SID_ATTR_CHAR ||
nOldSId == SID_TEXT_FITTOSIZE ||
nOldSId == SID_ATTR_CHAR_VERTICAL || nOldSId ==
SID_TEXT_FITTOSIZE_VERTICAL) &&
(nSId == SID_TEXTEDIT || nSId == SID_ATTR_CHAR || nSId ==
SID_TEXT_FITTOSIZE ||
nSId == SID_ATTR_CHAR_VERTICAL || nSId ==
SID_TEXT_FITTOSIZE_VERTICAL )))
{
bPermanent = sal_True;
}
GetCurrentFunction()->Deactivate();
}
I have no idea what the purpose of that is.
By the way, just by chance I found that if you *click twice* on a tool's item
in the toolbar, rather than just single-click it, the tool indeed does *not*
change back to the Selection tool once you draw something. It doesn't have to
be a fast double-click; simply clicking twice on the tool item will do it.
This seems un-idempotent enough to be a bug :)
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Libreoffice-bugs
mailing list