Skip to content

Commit

Permalink
Fix linked axes for case where Range.Min > previous Range.Max
Browse files Browse the repository at this point in the history
  • Loading branch information
epezent committed Aug 20, 2023
1 parent 30d175b commit e3eab27
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions implot_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -907,8 +907,9 @@ struct ImPlotAxis
}

void PullLinks() {
if (LinkedMin) { SetMin(*LinkedMin,true); }
if (LinkedMax) { SetMax(*LinkedMax,true); }
if (LinkedMin && LinkedMax) { SetRange(*LinkedMin, *LinkedMax); }
else if (LinkedMin) { SetMin(*LinkedMin,true); }
else if (LinkedMax) { SetMax(*LinkedMax,true); }
}
};

Expand Down

0 comments on commit e3eab27

Please sign in to comment.