Kaydet (Commit) f7d29b44 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Properly mark multiple ranges during undo and redo.

üst 64340f4c
...@@ -372,15 +372,23 @@ void ScMultiBlockUndo::ShowBlock() ...@@ -372,15 +372,23 @@ void ScMultiBlockUndo::ShowBlock()
if (maBlockRanges.empty()) if (maBlockRanges.empty())
return; return;
// Show the very first range. // Move to the sheet of the first range.
ScRange aRange = *maBlockRanges[0]; ScRange aRange = *maBlockRanges.front();
ShowTable(aRange); ShowTable(aRange);
pViewShell->MoveCursorAbs( pViewShell->MoveCursorAbs(
aRange.aStart.Col(), aRange.aStart.Row(), SC_FOLLOW_JUMP, false, false); aRange.aStart.Col(), aRange.aStart.Row(), SC_FOLLOW_JUMP, false, false);
SCTAB nTab = pViewShell->GetViewData()->GetTabNo(); SCTAB nTab = pViewShell->GetViewData()->GetTabNo();
aRange.aStart.SetTab(nTab); aRange.aStart.SetTab(nTab);
aRange.aEnd.SetTab(nTab); aRange.aEnd.SetTab(nTab);
pViewShell->MarkRange(aRange); pViewShell->MarkRange(aRange, false, false);
for (size_t i = 1, n = maBlockRanges.size(); i < n; ++i)
{
aRange = *maBlockRanges[i];
aRange.aStart.SetTab(nTab);
aRange.aEnd.SetTab(nTab);
pViewShell->MarkRange(aRange, false, true);
}
} }
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
......
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