differentiate command processors based on fitID

This commit is contained in:
Ryan Holmes
2018-08-13 17:16:00 -04:00
parent d74f2b2e42
commit 646a903f18
2 changed files with 16 additions and 2 deletions

View File

@@ -170,8 +170,6 @@ class MainFrame(wx.Frame):
i = wx.Icon(BitmapLoader.getBitmap("pyfa", "gui"))
self.SetIcon(i)
self.command = wx.CommandProcessor()
# Create the layout and windows
mainSizer = wx.BoxSizer(wx.HORIZONTAL)
@@ -246,6 +244,10 @@ class MainFrame(wx.Frame):
self.Bind(GE.EVT_SSO_LOGIN, self.onSSOLogin)
self.Bind(GE.EVT_SSO_LOGGING_IN, self.ShowSsoLogin)
@property
def command(self):
return Fit.getCommandProcessor(self.getActiveFit())
def ShowSsoLogin(self, event):
if getattr(event, "login_mode", LoginMethod.SERVER) == LoginMethod.MANUAL and getattr(event, "sso_mode", SsoMode.AUTO) == SsoMode.AUTO:
dlg = SsoLogin(self)