Merge pull request #1594 from outofculture/plotitem-regression
Fix Plotitem regression
This commit is contained in:
commit
6fc0389f33
@ -1,38 +1,33 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
import sys
|
import importlib
|
||||||
|
import os
|
||||||
import warnings
|
import warnings
|
||||||
import weakref
|
import weakref
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import os
|
|
||||||
from ...Qt import QtGui, QtCore, QT_LIB
|
from ..AxisItem import AxisItem
|
||||||
from ... import icons
|
from ..ButtonItem import ButtonItem
|
||||||
|
from ..GraphicsWidget import GraphicsWidget
|
||||||
|
from ..InfiniteLine import InfiniteLine
|
||||||
|
from ..LabelItem import LabelItem
|
||||||
|
from ..LegendItem import LegendItem
|
||||||
|
from ..PlotDataItem import PlotDataItem
|
||||||
|
from ..ViewBox import ViewBox
|
||||||
from ... import functions as fn
|
from ... import functions as fn
|
||||||
from ...widgets.FileDialog import FileDialog
|
from ... import icons, PlotCurveItem, ScatterPlotItem
|
||||||
from .. PlotDataItem import PlotDataItem
|
from ...Qt import QtGui, QtCore, QT_LIB
|
||||||
from .. ViewBox import ViewBox
|
|
||||||
from .. AxisItem import AxisItem
|
|
||||||
from .. LabelItem import LabelItem
|
|
||||||
from .. LegendItem import LegendItem
|
|
||||||
from .. GraphicsWidget import GraphicsWidget
|
|
||||||
from .. ButtonItem import ButtonItem
|
|
||||||
from .. InfiniteLine import InfiniteLine
|
|
||||||
from ...WidgetGroup import WidgetGroup
|
from ...WidgetGroup import WidgetGroup
|
||||||
from ...python2_3 import basestring
|
from ...python2_3 import basestring
|
||||||
|
from ...widgets.FileDialog import FileDialog
|
||||||
|
|
||||||
translate = QtCore.QCoreApplication.translate
|
translate = QtCore.QCoreApplication.translate
|
||||||
|
|
||||||
import importlib
|
|
||||||
ui_template = importlib.import_module(
|
ui_template = importlib.import_module(
|
||||||
f'.plotConfigTemplate_{QT_LIB.lower()}', package=__package__)
|
f'.plotConfigTemplate_{QT_LIB.lower()}', package=__package__)
|
||||||
|
|
||||||
__all__ = ['PlotItem']
|
__all__ = ['PlotItem']
|
||||||
|
|
||||||
try:
|
|
||||||
from metaarray import *
|
|
||||||
HAVE_METAARRAY = True
|
|
||||||
except:
|
|
||||||
HAVE_METAARRAY = False
|
|
||||||
|
|
||||||
|
|
||||||
class PlotItem(GraphicsWidget):
|
class PlotItem(GraphicsWidget):
|
||||||
"""GraphicsWidget implementing a standard 2D plotting area with axes.
|
"""GraphicsWidget implementing a standard 2D plotting area with axes.
|
||||||
@ -1019,7 +1014,7 @@ class PlotItem(GraphicsWidget):
|
|||||||
if numCurves != -1:
|
if numCurves != -1:
|
||||||
if self.ctrl.forgetTracesCheck.isChecked():
|
if self.ctrl.forgetTracesCheck.isChecked():
|
||||||
curve.clear()
|
curve.clear()
|
||||||
self.removeItem(curves[i])
|
self.removeItem(curve)
|
||||||
else:
|
else:
|
||||||
curve.hide()
|
curve.hide()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user