--- a/eric6/Graphics/PackageDiagramBuilder.py Sun May 02 18:16:54 2021 +0200 +++ b/eric6/Graphics/PackageDiagramBuilder.py Mon May 03 19:42:27 2021 +0200 @@ -243,7 +243,7 @@ todo = [module.createHierarchy()] while todo: hierarchy = todo[0] - for className in list(hierarchy.keys()): + for className in hierarchy: cw = self.__getCurrentShape(className) if not cw and className.find('.') >= 0: cw = self.__getCurrentShape(className.split('.')[-1]) @@ -335,7 +335,7 @@ # store generation info widths.append(currentWidth) heights.append(currentHeight) - + # add in some whitespace width *= whiteSpaceFactor height = height * whiteSpaceFactor - 20 @@ -344,8 +344,8 @@ sceneRect = self.umlView.sceneRect() width += 50.0 height += 50.0 - swidth = width < sceneRect.width() and sceneRect.width() or width - sheight = height < sceneRect.height() and sceneRect.height() or height + swidth = sceneRect.width() if width < sceneRect.width() else width + sheight = sceneRect.height() if height < sceneRect.height() else height self.umlView.setSceneSize(swidth, sheight) # distribute each generation across the width and the