Fix `._pg_overrides` import cycle caused by our `Axis` override

distribute_dis
Tyler Goodlet 2023-12-22 12:05:18 -05:00
parent 69368f20c2
commit d006ecce7e
1 changed files with 4 additions and 3 deletions

View File

@ -24,8 +24,6 @@ view transforms.
"""
import pyqtgraph as pg
from ._axes import Axis
def invertQTransform(tr):
"""Return a QTransform that is the inverse of *tr*.
@ -53,6 +51,9 @@ def _do_overrides() -> None:
pg.functions.invertQTransform = invertQTransform
pg.PlotItem = PlotItem
from ._axes import Axis
pg.Axis = Axis
# enable "QPainterPathPrivate for faster arrayToQPath" from
# https://github.com/pyqtgraph/pyqtgraph/pull/2324
pg.setConfigOption('enableExperimental', True)
@ -234,7 +235,7 @@ class PlotItem(pg.PlotItem):
# ``ViewBox`` geometry bug.. where a gap for the
# 'bottom' axis is somehow left in?
# axis = pg.AxisItem(orientation=name, parent=self)
axis = Axis(
axis = pg.Axis(
self,
orientation=name,
parent=self,