diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-03-25 16:01:57 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-03-30 09:23:48 +0200 |
commit | 5e43b9a9a05f1146c71fbce46a2ddce44c59c77b (patch) | |
tree | 32e97053f025f430d09cce5cae8133d5a7f93c6a /svx | |
parent | 2e2388dc554b29ab241de18b76e58fee947cc1b3 (diff) |
SdrMarkView tiled rendering: fix unexpected empty graphic selection events
There are a number of mark views, but we're only interested in the one
that belongs to the editing window. Ignore the virtual device of the
slide sorter and everything else.
With this, a shape remains selected after resized, and can be resized
multiple times again properly.
Change-Id: I7f31c72567b9d01aaa75871ff5d1efdb3151a0e4
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/svdraw/svdmrkv.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx index 6adfa2f0f2b1..66a2a323b2bf 100644 --- a/svx/source/svdraw/svdmrkv.cxx +++ b/svx/source/svdraw/svdmrkv.cxx @@ -669,6 +669,9 @@ void SdrMarkView::SetMarkHandles() // correct position ) Point aGridOff = GetGridOffset(); + // There can be multiple mark views, but we're only interested in the one that has a window associated. + const bool bTiledRendering = GetModel()->isTiledRendering() && GetFirstOutputDevice() && GetFirstOutputDevice()->GetOutDevType() == OUTDEV_WINDOW; + // check if text edit or ole is active and handles need to be suppressed. This may be the case // when a single object is selected // Using a strict return statement is okay here; no handles means *no* handles. @@ -686,7 +689,7 @@ void SdrMarkView::SetMarkHandles() if(pSdrTextObj && pSdrTextObj->IsInEditMode()) { - if (GetModel()->isTiledRendering()) + if (bTiledRendering) // Suppress handles -> empty graphic selection. GetModel()->libreOfficeKitCallback(LOK_CALLBACK_GRAPHIC_SELECTION, "EMPTY"); return; @@ -704,7 +707,7 @@ void SdrMarkView::SetMarkHandles() Rectangle aRect(GetMarkedObjRect()); - if (GetModel()->isTiledRendering()) + if (bTiledRendering) { Rectangle aSelection(aRect); OString sSelection; |