Kaydet (Commit) 7c5f1caa authored tarafından Daniel's avatar Daniel Kaydeden (comit) Thorsten Behrens

tdf#117581 impress: fix selection overlay after moving table

Change-Id: Ie5afa4fbddf86c6692a7ed68af9ef990c2f9f487
Reviewed-on: https://gerrit.libreoffice.org/54493Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarThorsten Behrens <Thorsten.Behrens@CIB.de>
üst b3b169dd
......@@ -177,6 +177,7 @@ private:
CellPos maCursorFirstPos;
CellPos maCursorLastPos;
bool mbCellSelectionMode;
bool mbHasJustMerged;
CellPos maMouseDownPos;
bool mbLeftButtonDown;
std::unique_ptr<sdr::overlay::OverlayObjectList> mpSelectionOverlay;
......
......@@ -172,6 +172,7 @@ SvxTableController::SvxTableController(
SdrView& rView,
const SdrTableObj& rObj)
: mbCellSelectionMode(false)
,mbHasJustMerged(false)
,mbLeftButtonDown(false)
,mpSelectionOverlay(nullptr)
,mrView(rView)
......@@ -1820,6 +1821,8 @@ void SvxTableController::MergeRange( sal_Int32 nFirstCol, sal_Int32 nFirstRow, s
}
xRange->merge();
mbHasJustMerged = true;
setSelectedCells( maCursorFirstPos, maCursorFirstPos );
if( bUndo )
rModel.EndUndo();
......@@ -2144,6 +2147,11 @@ void SvxTableController::onTableModified()
void SvxTableController::updateSelectionOverlay()
{
// There is no need to update selection overlay after merging cells
// since the selection overlay should remain the same
if ( mbHasJustMerged )
return;
destroySelectionOverlay();
if( mbCellSelectionMode )
{
......@@ -2792,9 +2800,11 @@ IMPL_LINK_NOARG(SvxTableController, UpdateHdl, void*, void)
if( aStart != maCursorFirstPos || aEnd != maCursorLastPos )
{
setSelectedCells( aStart, aEnd );
updateSelectionOverlay();
}
}
updateSelectionOverlay();
mbHasJustMerged = false;
}
namespace
......
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