Merge branch 'master' into test-3
This commit is contained in:
@@ -69,11 +69,12 @@ class FitSpawner(gui.multiSwitch.TabSpawner):
|
||||
pyfalog.critical(e)
|
||||
if count < 0:
|
||||
startup = getattr(event, "startup", False) # see OpenFitsThread in gui.mainFrame
|
||||
from_import = getattr(event, "from_import", False) # always open imported into a new tab
|
||||
sFit = Fit.getInstance()
|
||||
openFitInNew = sFit.serviceFittingOptions["openFitInNew"]
|
||||
mstate = wx.GetMouseState()
|
||||
|
||||
if (not openFitInNew and mstate.CmdDown()) or startup or (openFitInNew and not mstate.CmdDown()):
|
||||
if from_import or (not openFitInNew and mstate.CmdDown()) or startup or (openFitInNew and not mstate.CmdDown()):
|
||||
self.multiSwitch.AddPage()
|
||||
|
||||
view = self.multiSwitch.GetSelectedPage()
|
||||
|
||||
@@ -969,7 +969,7 @@ class MainFrame(wx.Frame):
|
||||
if len(fits) > 0:
|
||||
if len(fits) == 1:
|
||||
fit = fits[0]
|
||||
wx.PostEvent(self, FitSelected(fitID=fit.ID))
|
||||
wx.PostEvent(self, FitSelected(fitID=fit.ID, from_import=True))
|
||||
wx.PostEvent(self.shipBrowser, Stage3Selected(shipID=fit.shipID, back=True))
|
||||
else:
|
||||
fits.sort(key=lambda _fit: (_fit.ship.item.name, _fit.name))
|
||||
|
||||
Reference in New Issue
Block a user