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

This commit is contained in:
nirvn 2016-10-21 10:11:06 +07:00
parent 89fa21e5fa
commit bd7149ce16
4 changed files with 5 additions and 5 deletions

View File

@ -50,7 +50,7 @@ class EditRenderingStylesDialog(BASE, WIDGET):
self.alg = alg.getCopy()
self.tblStyles.horizontalHeader().setResizeMode(QHeaderView.Stretch)
self.tblStyles.horizontalHeader().setSectionResizeMode(QHeaderView.Stretch)
self.setWindowTitle(self.alg.name)
self.valueItems = {}

View File

@ -237,7 +237,7 @@ class ModelerAlgorithm(GeoAlgorithm):
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)

View File

@ -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

View File

@ -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,