Move "graphs enabled" variable to top of graphs module

This commit is contained in:
DarkPhoenix
2019-08-15 11:49:26 +03:00
parent 3ab06d0832
commit c7e769e42e
4 changed files with 25 additions and 6 deletions

View File

@@ -0,0 +1,22 @@
# =============================================================================
# Copyright (C) 2010 Diego Duclos
#
# This file is part of pyfa.
#
# pyfa is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# pyfa is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with pyfa. If not, see <http://www.gnu.org/licenses/>.
# =============================================================================
from .gui.canvasPanel import graphFrame_enabled
from .gui.frame import GraphFrame

View File

@@ -16,6 +16,3 @@
# You should have received a copy of the GNU General Public License
# along with pyfa. If not, see <http://www.gnu.org/licenses/>.
# =============================================================================
from .frame import GraphFrame

View File

@@ -37,7 +37,7 @@ import gui.fitCommands as cmd
import gui.globalEvents as GE
from eos.config import gamedata_date, gamedata_version
from eos.modifiedAttributeDict import ModifiedAttributeDict
from graphs.gui import GraphFrame
from graphs import GraphFrame
from gui.additionsPane import AdditionsPane
from gui.bitmap_loader import BitmapLoader
from gui.builtinMarketBrowser.events import ItemSelected

View File

@@ -21,9 +21,9 @@
import wx
import config
import graphs
from service.character import Character
from service.fit import Fit
from graphs.gui import canvasPanel as graphCanvasPanel
import gui.globalEvents as GE
from gui.bitmap_loader import BitmapLoader
@@ -101,7 +101,7 @@ class MainMenuBar(wx.MenuBar):
graphFrameItem = wx.MenuItem(fitMenu, self.graphFrameId, "&Graphs\tCTRL+G")
graphFrameItem.SetBitmap(BitmapLoader.getBitmap("graphs_small", "gui"))
fitMenu.Append(graphFrameItem)
if not graphCanvasPanel.graphFrame_enabled:
if not graphs.graphFrame_enabled:
self.Enable(self.graphFrameId, False)
self.ignoreRestrictionItem = fitMenu.Append(self.toggleIgnoreRestrictionID, "Disable Fitting Re&strictions")