Move loading defaults to preference buttons

This commit is contained in:
DarkPhoenix
2019-04-08 17:43:11 +03:00
parent 01b16ec5f0
commit 1ddc2edd88
3 changed files with 19 additions and 25 deletions

View File

@@ -36,7 +36,6 @@ from wx.lib.inspection import InspectionTool
import config
import gui.globalEvents as GE
from eos.config import gamedata_date, gamedata_version
from eos.db.saveddata.loadDefaultDatabaseValues import DefaultDatabaseValues
# import this to access override setting
from eos.modifiedAttributeDict import ModifiedAttributeDict
from gui import graphFrame
@@ -450,21 +449,10 @@ class MainFrame(wx.Frame):
def goForums(event):
webbrowser.open('https://forums.eveonline.com/t/27156')
@staticmethod
def loadDatabaseDefaults(event):
# Import values that must exist otherwise Pyfa breaks
DefaultDatabaseValues.importRequiredDefaults()
# Import default values for damage profiles
DefaultDatabaseValues.importDamageProfileDefaults()
# Import default values for target resist profiles
DefaultDatabaseValues.importResistProfileDefaults()
def registerMenu(self):
menuBar = self.GetMenuBar()
# Quit
self.Bind(wx.EVT_MENU, self.ExitApp, id=wx.ID_EXIT)
# Load Default Database values
self.Bind(wx.EVT_MENU, self.loadDatabaseDefaults, id=menuBar.importDatabaseDefaultsId)
# Widgets Inspector
if config.debug:
self.Bind(wx.EVT_MENU, self.openWXInspectTool, id=self.widgetInspectMenuID)