summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2017-05-26 23:16:57 +0900
committerMichael Stahl <mstahl@redhat.com>2017-06-07 14:20:36 +0200
commit008043ed195cec3bd526ac0c4e96d32d2c3e345f (patch)
tree869d66fb778a0299d006d887987c2b657ba0a3ec
parent28af2749ebe19d8ce2c5972c2b4f70e79ad0356b (diff)
tdf#108024 Keep original selection during DrawViewShell::FuTemporary()
Otherwise it was disposed in the middle of its own mouse event handler FuSelection::MouseButtonUp(). Change-Id: I0d96048526dece7232e5a777364ad4da1d64c904 Reviewed-on: https://gerrit.libreoffice.org/37976 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit 96d59ffc572c4cf112405a85aee3366d45bc7757) Reviewed-on: https://gerrit.libreoffice.org/38302 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit 64c8c76a1dca96cb2ceed2aced8ff4e5efd60aa9) Reviewed-on: https://gerrit.libreoffice.org/38338 Reviewed-by: Eike Rathke <erack@redhat.com> Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r--sd/source/ui/view/drviews2.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 68f0e38f5848..1dc6eb853fc1 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -1110,7 +1110,8 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
// Set the selection tool as the old one. This in particular important for the
// zoom function, in which clicking without dragging zooms as well, and that
// makes exiting the object editing mode impossible.
- SetOldFunction( FuSelection::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq ) );
+ if (dynamic_cast<FuSelection*>( GetOldFunction().get() ) == nullptr)
+ SetOldFunction( FuSelection::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq ) );
Cancel();
rReq.Ignore ();
}