Skip to content

Commit

Permalink
Do not use invalid iterators (#749)
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiolo authored Nov 4, 2024
1 parent 866ecfd commit 8e2ea5d
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
@@ -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());
if (auto diff = drawpath.size() - len)
drawpath.erase(drawpath.begin(), drawpath.begin() + diff);
}

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

0 comments on commit 8e2ea5d

Please sign in to comment.