Skip to content

Commit

Permalink
[processing] fix broken modeler under pyqt5/python3 (fixes #15734)
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn committed Oct 21, 2016
1 parent 89fa21e commit bd7149c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion python/plugins/processing/gui/EditRenderingStylesDialog.py
Expand Up @@ -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 = {}
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/modeler/ModelerAlgorithm.py
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/modeler/ModelerArrowItem.py
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions python/plugins/processing/modeler/ModelerGraphicItem.py
Expand Up @@ -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):
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit bd7149c

Please sign in to comment.