summaryrefslogtreecommitdiff
path: root/sc/source/ui/app/inputhdl.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/app/inputhdl.cxx')
-rw-r--r--sc/source/ui/app/inputhdl.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 97b54526f20c..0c7e80720e0d 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -508,7 +508,10 @@ void ScInputHandler::UpdateLokReferenceMarks()
long nX2 = rViewData.GetRefEndX();
long nY1 = rViewData.GetRefStartY();
long nY2 = rViewData.GetRefEndY();
- long nTab = rViewData.GetTabNo();
+ long nTab = rViewData.GetRefStartZ();
+
+ if (rViewData.GetRefEndZ() == rViewData.GetTabNo())
+ nTab = rViewData.GetRefEndZ();
PutInOrder(nX1, nX2);
PutInOrder(nY1, nY2);