Do not pass selection as fallback, as we're now calculating clicked row properly
This commit is contained in:
@@ -306,9 +306,6 @@ class DroneView(Display):
|
||||
else:
|
||||
if drone in self.original:
|
||||
mainDrone = drone
|
||||
# Fall back to first selected item only if position is -1
|
||||
elif len(selection) > 0:
|
||||
mainDrone = selection[0]
|
||||
sourceContext = "droneItem"
|
||||
itemContext = Market.getInstance().getCategoryByItem(mainDrone.item).name if mainDrone is not None else mainDrone
|
||||
menu = ContextMenu.getMenu(mainDrone, selection, (sourceContext, itemContext))
|
||||
|
||||
@@ -663,10 +663,6 @@ class FittingView(d.Display):
|
||||
else:
|
||||
if mod in fit.modules:
|
||||
mainMod = mod
|
||||
# Fall back to first selected module only if position is -1
|
||||
elif len(selection) > 0:
|
||||
mainMod = selection[0]
|
||||
|
||||
menu = ContextMenu.getMenu(mainMod, selection, *contexts)
|
||||
self.PopupMenu(menu)
|
||||
|
||||
|
||||
@@ -291,6 +291,7 @@ class Display(wx.ListCtrl):
|
||||
if window.GetName() == 'panel':
|
||||
ptCorrection = window.GetPosition()
|
||||
ptScreen = ptScreen - ptCorrection
|
||||
break
|
||||
ptClient = wx.ListCtrl.ScreenToClient(self, ptScreen)
|
||||
return ptClient
|
||||
|
||||
|
||||
Reference in New Issue
Block a user