MNT: Remove commented code
This commit is contained in:
parent
a52d8f7222
commit
3bdb29e521
@ -291,11 +291,8 @@ class ImageItem(GraphicsObject):
|
||||
y = self.mapToDevice(QtCore.QPointF(0,1))
|
||||
w = Point(x-o).length()
|
||||
h = Point(y-o).length()
|
||||
xds = max(1, int(1/w))
|
||||
yds = max(1, int(1/h))
|
||||
# xds = int(1/max(1,w))
|
||||
# yds = int(1/max(1,h))
|
||||
# 1/0
|
||||
xds = int(1/max(1, w))
|
||||
yds = int(1/max(1, h))
|
||||
image = fn.downsample(self.image, xds, axis=0)
|
||||
image = fn.downsample(image, yds, axis=1)
|
||||
else:
|
||||
|
@ -22,44 +22,3 @@ def test_dividebyzero():
|
||||
# must manually call im.imageItem.render here or the exception
|
||||
# will only exist on the Qt event loop
|
||||
im.imageItem.render()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
test_dividebyzero()
|
||||
|
||||
|
||||
# def test_getViewWidget():
|
||||
# view = pg.PlotWidget()
|
||||
# vref = weakref.ref(view)
|
||||
# item = pg.InfiniteLine()
|
||||
# view.addItem(item)
|
||||
# assert item.getViewWidget() is view
|
||||
# del view
|
||||
# gc.collect()
|
||||
# assert vref() is None
|
||||
# assert item.getViewWidget() is None
|
||||
#
|
||||
# def test_getViewWidget_deleted():
|
||||
# view = pg.PlotWidget()
|
||||
# item = pg.InfiniteLine()
|
||||
# view.addItem(item)
|
||||
# assert item.getViewWidget() is view
|
||||
#
|
||||
# # Arrange to have Qt automatically delete the view widget
|
||||
# obj = pg.QtGui.QWidget()
|
||||
# view.setParent(obj)
|
||||
# del obj
|
||||
# gc.collect()
|
||||
#
|
||||
# assert not pg.Qt.isQObjectAlive(view)
|
||||
# assert item.getViewWidget() is None
|
||||
|
||||
|
||||
#if __name__ == '__main__':
|
||||
#view = pg.PlotItem()
|
||||
#vref = weakref.ref(view)
|
||||
#item = pg.InfiniteLine()
|
||||
#view.addItem(item)
|
||||
#del view
|
||||
#gc.collect()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user