Do not use GetItemData where we do not need it

This commit is contained in:
DarkPhoenix
2019-04-29 15:37:54 +03:00
parent e346239174
commit 72fe52e560
7 changed files with 26 additions and 25 deletions

View File

@@ -170,7 +170,7 @@ class CargoView(d.Display):
row, _ = self.HitTest(event.Position)
if row != -1:
try:
cargo = self.cargo[self.GetItemData(row)]
cargo = self.cargo[row]
except IndexError:
return
self.removeCargos([cargo])
@@ -205,7 +205,7 @@ class CargoView(d.Display):
cargos = []
for row in self.getSelectedRows():
try:
cargo = self.cargo[self.GetItemData(row)]
cargo = self.cargo[row]
except IndexError:
continue
cargos.append(cargo)