Skip to content

Commit

Permalink
FIX: Don't try to remove a curve from an axis that doesn't think that…
Browse files Browse the repository at this point in the history
… it exists
  • Loading branch information
aksharsarvesh committed Aug 27, 2024
1 parent 7576f3f commit c4dd865
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pydm/widgets/multi_axis_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,11 @@ def unlinkDataFromAxis(self, curve: PlotDataItem):
axisName: str
The name of the axis that a curve is being removed from
"""
if hasattr(curve, "y_axis_name") and curve.y_axis_name in self.axes:
if (
hasattr(curve, "y_axis_name")
and curve.y_axis_name in self.axes
and curve in self.axes[curve.y_axis_name]["item"]._curves
):
self.axes[curve.y_axis_name]["item"]._curves.remove(curve)
self.autoVisible(curve.y_axis_name)

Expand Down

0 comments on commit c4dd865

Please sign in to comment.