Overrides work properly now. Currently toggled on/off by opening character editor, this will be taken over by a menu option
This commit is contained in:
@@ -38,6 +38,9 @@ class ChargeAttrShortcut(object):
|
||||
return None
|
||||
|
||||
class ModifiedAttributeDict(collections.MutableMapping):
|
||||
|
||||
OVERRIDES = True
|
||||
|
||||
class CalculationPlaceholder():
|
||||
pass
|
||||
|
||||
@@ -109,6 +112,8 @@ class ModifiedAttributeDict(collections.MutableMapping):
|
||||
del self.__intermediary[key]
|
||||
|
||||
def getOriginal(self, key):
|
||||
if self.OVERRIDES and key in self.__overrides:
|
||||
return self.__overrides.get(key)
|
||||
val = self.__original.get(key)
|
||||
if val is None:
|
||||
return None
|
||||
|
||||
@@ -29,6 +29,8 @@ from gui.contextMenu import ContextMenu
|
||||
from wx.lib.buttons import GenBitmapButton
|
||||
import gui.globalEvents as GE
|
||||
|
||||
from eos.modifiedAttributeDict import ModifiedAttributeDict
|
||||
|
||||
class CharacterEditor(wx.Frame):
|
||||
def __init__(self, parent):
|
||||
wx.Frame.__init__ (self, parent, id=wx.ID_ANY, title=u"pyfa: Character Editor", pos=wx.DefaultPosition,
|
||||
@@ -36,6 +38,10 @@ class CharacterEditor(wx.Frame):
|
||||
|
||||
i = wx.IconFromBitmap(BitmapLoader.getBitmap("character_small", "gui"))
|
||||
|
||||
print ModifiedAttributeDict.OVERRIDES
|
||||
ModifiedAttributeDict.OVERRIDES = not ModifiedAttributeDict.OVERRIDES
|
||||
print ModifiedAttributeDict.OVERRIDES
|
||||
|
||||
self.mainFrame = parent
|
||||
|
||||
self.SetIcon(i)
|
||||
|
||||
Reference in New Issue
Block a user