fix flowchart context menu redundant menu (#1060)

This commit is contained in:
wuyuanyi135 2019-11-03 00:36:58 -04:00 committed by Ogi Moore
parent f2740f7e69
commit cb4d9b23b2

View File

@ -834,9 +834,9 @@ class FlowchartWidget(dockarea.DockArea):
def buildMenu(self, pos=None):
def buildSubMenu(node, rootMenu, subMenus, pos=None):
for section, node in node.items():
menu = QtGui.QMenu(section)
rootMenu.addMenu(menu)
if isinstance(node, OrderedDict):
if isinstance(node, OrderedDict):
menu = QtGui.QMenu(section)
rootMenu.addMenu(menu)
buildSubMenu(node, menu, subMenus, pos=pos)
subMenus.append(menu)
else: