summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/gridwin.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/view/gridwin.cxx')
-rw-r--r--sc/source/ui/view/gridwin.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 1de54e8f03e5..284fc13a29a8 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -6056,7 +6056,7 @@ void ScGridWindow::UpdateCursorOverlay()
SCCOL nX2 = nX + rMerge.GetColMerge() - 1;
SCROW nY2 = nY + rMerge.GetRowMerge() - 1;
// Check if the middle or tail of the merged range is visible.
- if (!(maVisibleRange.mnCol1 <= nX2 && maVisibleRange.mnRow1 <= nY2))
+ if (maVisibleRange.mnCol1 > nX2 || maVisibleRange.mnRow1 > nY2)
return; // no visible part
}