From 771bb58c1c547a874c80d05be59f73cbf68343df Mon Sep 17 00:00:00 2001 From: Jan Holesovsky Date: Tue, 14 Apr 2015 12:08:39 +0200 Subject: 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 --- editeng/source/editeng/impedit2.cxx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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() ) -- cgit