Don't spawn menu if fitID is None

This commit is contained in:
cncfanatics
2010-10-11 11:04:18 +02:00
parent 982d02b451
commit 3e41d413c9

View File

@@ -9,7 +9,7 @@ class DamagePattern(ContextMenu):
self.mainFrame = gui.mainFrame.MainFrame.getInstance()
def display(self, context, selection):
return context in ("resistancesViewFull",)
return context in ("resistancesViewFull",) and self.mainFrame.getActiveFit() is not None
def getText(self, context, selection):
sDP = service.DamagePattern.getInstance()