summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2015-04-14 12:08:39 +0200
committerJan Holesovsky <kendy@collabora.com>2015-04-14 12:16:44 +0200
commit771bb58c1c547a874c80d05be59f73cbf68343df (patch)
treeb6ae9f90ff820731e0d68ac2318eb5137bb762a8 /editeng
parent3f04bfef9e12e947f336aaa441d784f6c77f8e6a (diff)
editeng tiled editing: Don't overwrite bInSelection.
Setting bInSelection in MouseButtonUp() feels wrong, and against of its other handling elsewhere. Also it breaks the selection handling in the tiled rendering case - on further redraw, selections may disappear. But it has been so since the initial check-in of the OOo code, so I have no idea what corner case I might break by deleting this, so let's guard the behavior by isTiledReneding() for now. Change-Id: I7f7b237f9f0f427e317266e05481bac439c3c8ad
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/impedit2.cxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index 7fc5c43c0a65..7d4f1c8a2b92 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -567,7 +567,15 @@ bool ImpEditEngine::MouseButtonUp( const MouseEvent& rMEvt, EditView* pView )
{
GetSelEngine().SetCurView( pView );
GetSelEngine().SelMouseButtonUp( rMEvt );
- bInSelection = false;
+
+ // in the tiled rendering case, setting bInSelection here has unexpected
+ // consequences - further tiles painting removes the selection
+ // FIXME I believe resetting bInSelection should not be here even in the
+ // non-tiled-rendering case, but it has been here since 2000 (and before)
+ // so who knows what corner case it was supposed to solve back then
+ if (!pView->pImpEditView->isTiledRendering())
+ bInSelection = false;
+
// Special treatments
EditSelection aCurSel( pView->pImpEditView->GetEditSelection() );
if ( !aCurSel.HasRange() )