Skip to content
Permalink
Browse files

[processing] fix broken modeler under pyqt5/python3 (fixes #15734)

  • Loading branch information
nirvn committed Oct 21, 2016
1 parent 89fa21e commit bd7149ce162f30f6107d5ab4197090d8ed5bdcdd
@@ -50,7 +50,7 @@ def __init__(self, alg):

self.alg = alg.getCopy()

self.tblStyles.horizontalHeader().setResizeMode(QHeaderView.Stretch)
self.tblStyles.horizontalHeader().setSectionResizeMode(QHeaderView.Stretch)
self.setWindowTitle(self.alg.name)

self.valueItems = {}
@@ -237,7 +237,7 @@ def getCopy(self):
newone.provider = self.provider

newone.algs = {}
for algname, alg in self.algs.iteritems():
for algname, alg in self.algs.items():
newone.algs[algname] = Algorithm()
newone.algs[algname].__dict__.update(copy.deepcopy(alg.todict()))
newone.inputs = copy.deepcopy(self.inputs)
@@ -57,7 +57,7 @@ class ModelerArrowItem(QGraphicsPathItem):

def __init__(self, startItem, startIndex, endItem, endIndex,
parent=None, scene=None):
super(ModelerArrowItem, self).__init__(parent, scene)
super(ModelerArrowItem, self).__init__(parent)
self.arrowHead = QPolygonF()
self.endIndex = endIndex
self.startIndex = startIndex
@@ -43,7 +43,7 @@ class ModelerGraphicItem(QGraphicsItem):
BOX_WIDTH = 200

def __init__(self, element, model):
super(ModelerGraphicItem, self).__init__(None, None)
super(ModelerGraphicItem, self).__init__(None)
self.model = model
self.element = element
if isinstance(element, ModelerParameter):
@@ -337,7 +337,7 @@ class FlatButtonGraphicItem(QGraphicsItem):
HEIGHT = 16

def __init__(self, icon, position, action):
super(FlatButtonGraphicItem, self).__init__(None, None)
super(FlatButtonGraphicItem, self).__init__(None)
self.setAcceptHoverEvents(True)
self.setFlag(QGraphicsItem.ItemIsMovable, False)
self.pixmap = icon.pixmap(self.WIDTH, self.HEIGHT,

0 comments on commit bd7149c

Please sign in to comment.
You can’t perform that action at this time.