From bde20432948548ff610ad17ad18481bcf1263a32 Mon Sep 17 00:00:00 2001 From: DarkPhoenix Date: Sun, 21 Apr 2019 23:47:21 +0300 Subject: [PATCH] Do not crash when landing module on non-filled module slot while holding alt --- gui/builtinViews/fittingView.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/builtinViews/fittingView.py b/gui/builtinViews/fittingView.py index 8f92c68a9..8bc35ba5e 100644 --- a/gui/builtinViews/fittingView.py +++ b/gui/builtinViews/fittingView.py @@ -450,7 +450,7 @@ class FittingView(d.Display): dstPos = fit.modules.index(dstMod) if dstMod is not None else None mstate = wx.GetMouseState() # If we dropping on a module, try to replace, or add if replacement fails - if item.isModule and dstMod is not None: + if item.isModule and dstMod is not None and not dstMod.isEmpty: positions = getSimilarModPositions(fit.modules, dstMod) if mstate.altDown else [dstPos] command = cmd.GuiReplaceLocalModuleCommand(fitID=fitID, itemID=itemID, positions=positions) if not self.mainFrame.command.Submit(command):