This commit is contained in:
blitzman
2017-02-11 11:12:10 -05:00
parent a2ca5eb8a4
commit bfcb73f344
2 changed files with 5 additions and 1 deletions

View File

@@ -954,7 +954,7 @@ class MainFrame(wx.Frame):
if graphFrame.graphFrame_enabled:
self.graphFrame.Show()
else:
elif graphFrame.graphFrame_enabled:
self.graphFrame.SetFocus()
def openWXInspectTool(self, event):

View File

@@ -22,6 +22,7 @@ import wx
import config
from service.character import Character
import gui.graphFrame
import gui.globalEvents as GE
from gui.bitmapLoader import BitmapLoader
@@ -116,6 +117,9 @@ class MainMenuBar(wx.MenuBar):
graphFrameItem.SetBitmap(BitmapLoader.getBitmap("graphs_small", "gui"))
windowMenu.AppendItem(graphFrameItem)
if not gui.graphFrame.graphFrame_enabled:
self.Enable(self.graphFrameId, False)
preferencesShortCut = "CTRL+," if 'wxMac' in wx.PlatformInfo else "CTRL+P"
preferencesItem = wx.MenuItem(windowMenu, wx.ID_PREFERENCES, "Preferences\t" + preferencesShortCut)
preferencesItem.SetBitmap(BitmapLoader.getBitmap("preferences_small", "gui"))