Skip to content

Commit

Permalink
Only erase Selections as so much as they exist
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiolo committed Nov 4, 2024
1 parent 4a78638 commit 2cc4c3f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/document.h
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,8 @@ struct Document {
if (drawroot->grid && drawroot->grid->folded)
SetSelect(drawroot->parent->grid->FindCell(drawroot));
}
while (len < drawpath.size()) drawpath.erase(drawpath.begin());
auto diff = (int)drawpath.size() - max(0, len);
if (diff > 0) drawpath.erase(drawpath.begin(), drawpath.begin() + diff);
}

void Zoom(int dir, wxDC &dc, bool fromroot = false) {
Expand Down

0 comments on commit 2cc4c3f

Please sign in to comment.