generalized method addActions in order to be more flexible in adding actions to different QtObject types

This commit is contained in:
Sebastian Wehling-Benatelli 2015-02-23 14:38:26 +01:00
parent cc002c9460
commit d4d464d400

View File

@ -335,12 +335,12 @@ class MainWindow(QMainWindow):
def getDataWidget(self): def getDataWidget(self):
return self.DataPlot return self.DataPlot
def addMenuActions(self, menu, actions): def addActions(self, target, actions):
for action in actions: for action in actions:
if action is None: if action is None:
menu.addSeparator() target.addSeparator()
else: else:
menu.addAction(action) target.addAction(action)
def okToContinue(self): def okToContinue(self):
if self.dirty: if self.dirty: