sc/source/ui/view/tabview3.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
New commits: commit c30306ad19f7ba022628f4f88ba5b92b8a1af402 Author: Eike Rathke <[email protected]> AuthorDate: Tue May 31 22:48:28 2022 +0200 Commit: Eike Rathke <[email protected]> CommitDate: Wed Jun 1 00:08:25 2022 +0200 MoveCursorAbs: it is cheaper to check for marks first and then formula mode ... so repeated travelling with cell cursor will be less affected. Change-Id: I3f42356e66b2ec8acf60c0e0c777f8c34b9a952a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135211 Reviewed-by: Eike Rathke <[email protected]> Tested-by: Jenkins diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx index b261f04e0119..ae960b0a8c1f 100644 --- a/sc/source/ui/view/tabview3.cxx +++ b/sc/source/ui/view/tabview3.cxx @@ -1236,13 +1236,14 @@ void ScTabView::MoveCursorAbs( SCCOL nCurX, SCROW nCurY, ScFollowMode eMode, } else { - if (!bShift && !SC_MOD()->IsFormulaMode()) + if (!bShift) { // Remove all marked data on cursor movement unless the Shift is - // locked or while editing a formula. + // locked or while editing a formula. It is cheaper to check for + // marks first and then formula mode. ScMarkData& rMark = aViewData.GetMarkData(); bool bMarked = rMark.IsMarked() || rMark.IsMultiMarked(); - if (bMarked) + if (bMarked && !SC_MOD()->IsFormulaMode()) { rMark.ResetMark(); DoneBlockMode();
