tdf#171174: the target position is one less when moving to the right
Change-Id: I13504468119706597ca25c14309e6548ea4ca588 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201207 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
This commit is contained in:
@@ -551,7 +551,13 @@ sal_Int8 ScTabControl::ExecuteDrop( const ExecuteDropEvent& rEvt )
|
||||
SCTAB nPos = GetPrivatDropPos( rEvt.maPosPixel );
|
||||
HideDropPos();
|
||||
|
||||
if ( nPos == pData->pCellTransfer->GetVisibleTab() && rEvt.mnAction == DND_ACTION_MOVE )
|
||||
SCTAB nOldPos = pData->pCellTransfer->GetVisibleTab();
|
||||
if (rEvt.mnAction == DND_ACTION_MOVE && nPos > nOldPos)
|
||||
{
|
||||
// when moving to the right, the position is one less after removing the table
|
||||
--nPos;
|
||||
}
|
||||
if (nPos == nOldPos && rEvt.mnAction == DND_ACTION_MOVE)
|
||||
{
|
||||
// #i83005# do nothing - don't move to the same position
|
||||
// (too easily triggered unintentionally, and might take a long time in large documents)
|
||||
|
||||
Reference in New Issue
Block a user