Skip to content

Commit

Permalink
Only fireZoomChanged when zoom has changed
Browse files Browse the repository at this point in the history
  • Loading branch information
rolandlo committed Nov 20, 2022
1 parent dcae0c4 commit 2c9e5f7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/control/zoom/ZoomControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,9 @@ auto ZoomControl::getZoom() const -> double { return this->zoom; }
auto ZoomControl::getZoomReal() const -> double { return this->zoom / this->zoom100Value; }

void ZoomControl::setZoom(double zoomI) {
if (this->zoom == zoomI) {
return;
}
this->zoom = zoomI;
fireZoomChanged();
}
Expand Down

0 comments on commit 2c9e5f7

Please sign in to comment.