Skip to content

Commit

Permalink
Fix assert involving zooming an empty plot
Browse files Browse the repository at this point in the history
  • Loading branch information
timangus committed Oct 17, 2023
1 parent 29fa5c2 commit d995746
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions source/plugins/correlation/correlationplotitem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,10 @@ void CorrelationPlotWorker::zoom(QCPAxis* axis, double centre, int direction)

auto& parameters = _axisParameters[axis];

// Can't zoom if no range has been established
if(parameters._min > parameters._max)
return;

auto zoomFactor = zoomStepFactor;
if(direction < 0)
zoomFactor = 1.0 / zoomFactor;
Expand Down

0 comments on commit d995746

Please sign in to comment.