Skip to content

Commit 0adb6ae

Browse files
committed
Fix circular import (introduced with SelectPointsTool)
1 parent f5ae2d1 commit 0adb6ae

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

plotpy/tools/curve.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@
2626
from plotpy.interfaces import ICurveItemType
2727
from plotpy.items import Marker, XRangeSelection
2828
from plotpy.items.curve.base import CurveItem
29-
from plotpy.plot.base import BasePlot
3029
from plotpy.tools.base import DefaultToolbarID, InteractiveTool, ToggleTool
3130
from plotpy.tools.cursor import BaseCursorTool
3231

3332
if TYPE_CHECKING:
33+
from plotpy.plot.base import BasePlot
3434
from plotpy.plot.manager import PlotManager
3535

3636

@@ -439,7 +439,7 @@ def _init_current_marker(
439439
title: Marker title. Defaults to "".
440440
"""
441441
plot = filter.plot
442-
if not isinstance(plot, BasePlot):
442+
if plot is None:
443443
return
444444
if force_new_marker or self.current_location_marker is None:
445445
title = title or f"<b>{self.TITLE} {len(self.markers)}</b><br>"
@@ -489,7 +489,7 @@ def move(self, filter: StatefulEventFilter, event: QG.QMouseEvent) -> None:
489489
event: Qt mouse event
490490
"""
491491
plot = filter.plot
492-
if not isinstance(plot, BasePlot):
492+
if plot is None:
493493
return
494494
if self.current_location_marker is None:
495495
return # something is wrong ...

0 commit comments

Comments
 (0)