Skip to content

Commit

Permalink
Cram into branch condition (#755)
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiolo authored Nov 10, 2024
1 parent 72d7cf4 commit 79840b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/document.h
Original file line number Diff line number Diff line change
Expand Up @@ -507,8 +507,8 @@ struct Document {
if (drawroot->grid && drawroot->grid->folded)
SetSelect(drawroot->parent->grid->FindCell(drawroot));
}
auto diff = (int)drawpath.size() - max(0, len);
if (diff > 0) drawpath.erase(drawpath.begin(), drawpath.begin() + diff);
if (auto diff = (int)drawpath.size() - max(0, len) > 0)
drawpath.erase(drawpath.begin(), drawpath.begin() + diff);
}

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

0 comments on commit 79840b8

Please sign in to comment.