Kaydet (Commit) 5e43b9a9 authored tarafından Miklos Vajna's avatar Miklos Vajna

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
üst 2e2388dc
...@@ -669,6 +669,9 @@ void SdrMarkView::SetMarkHandles() ...@@ -669,6 +669,9 @@ void SdrMarkView::SetMarkHandles()
// correct position ) // correct position )
Point aGridOff = GetGridOffset(); 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 // 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 // when a single object is selected
// Using a strict return statement is okay here; no handles means *no* handles. // Using a strict return statement is okay here; no handles means *no* handles.
...@@ -686,7 +689,7 @@ void SdrMarkView::SetMarkHandles() ...@@ -686,7 +689,7 @@ void SdrMarkView::SetMarkHandles()
if(pSdrTextObj && pSdrTextObj->IsInEditMode()) if(pSdrTextObj && pSdrTextObj->IsInEditMode())
{ {
if (GetModel()->isTiledRendering()) if (bTiledRendering)
// Suppress handles -> empty graphic selection. // Suppress handles -> empty graphic selection.
GetModel()->libreOfficeKitCallback(LOK_CALLBACK_GRAPHIC_SELECTION, "EMPTY"); GetModel()->libreOfficeKitCallback(LOK_CALLBACK_GRAPHIC_SELECTION, "EMPTY");
return; return;
...@@ -704,7 +707,7 @@ void SdrMarkView::SetMarkHandles() ...@@ -704,7 +707,7 @@ void SdrMarkView::SetMarkHandles()
Rectangle aRect(GetMarkedObjRect()); Rectangle aRect(GetMarkedObjRect());
if (GetModel()->isTiledRendering()) if (bTiledRendering)
{ {
Rectangle aSelection(aRect); Rectangle aSelection(aRect);
OString sSelection; OString sSelection;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment