Do not show resist column and mode picker when resists are ignored
This commit is contained in:
@@ -21,7 +21,7 @@ class GraphDmgIgnoreResistsMenu(ContextMenuUnconditional):
|
||||
|
||||
def activate(self, callingWindow, fullContext, i):
|
||||
self.settings.set('ignoreResists', not self.settings.get('ignoreResists'))
|
||||
wx.PostEvent(self.mainFrame, GE.GraphOptionChanged(refreshAxeLabels=True))
|
||||
wx.PostEvent(self.mainFrame, GE.GraphOptionChanged(refreshAxeLabels=True, refreshColumns=True))
|
||||
|
||||
def isChecked(self, i):
|
||||
return self.settings.get('ignoreResists')
|
||||
|
||||
@@ -8,6 +8,7 @@ from graphs.events import ResistModeChanged
|
||||
from graphs.wrapper import TargetWrapper
|
||||
from gui.contextMenu import ContextMenuCombined
|
||||
from service.const import TargetResistMode
|
||||
from service.settings import GraphSettings
|
||||
|
||||
|
||||
optionMap = OrderedDict((
|
||||
@@ -26,6 +27,8 @@ class TargetWrapperResists(ContextMenuCombined):
|
||||
def display(self, callingWindow, srcContext, mainItem, selection):
|
||||
if srcContext != 'graphTgtList':
|
||||
return False
|
||||
if GraphSettings.getInstance().get('ignoreResists'):
|
||||
return False
|
||||
if not isinstance(mainItem, TargetWrapper) or not mainItem.isFit:
|
||||
return False
|
||||
self.callingWindow = callingWindow
|
||||
|
||||
Reference in New Issue
Block a user