Fixing some issues due to import cleanup
This commit is contained in:
@@ -159,6 +159,13 @@ class HandledModuleList(HandledList):
|
||||
for i in xrange(oldPos, len(self)):
|
||||
self[i].position -= 1
|
||||
|
||||
def toDummy(self, index):
|
||||
mod = self[index]
|
||||
if not mod.isEmpty:
|
||||
dummy = eos.types.Module.buildEmpty(mod.slot)
|
||||
dummy.position = index
|
||||
self[index] = dummy
|
||||
|
||||
def toModule(self, index, mod):
|
||||
mod.position = index
|
||||
self[index] = mod
|
||||
|
||||
@@ -132,13 +132,6 @@ class Module(HandledItem, HandledCharge, ItemAttrShortcut, ChargeAttrShortcut, l
|
||||
self.__chargeModifiedAttributes.original = self.__charge.attributes
|
||||
self.__chargeModifiedAttributes.overrides = self.__charge.overrides
|
||||
|
||||
def toDummy(self, index):
|
||||
mod = self[index]
|
||||
if not mod.isEmpty:
|
||||
dummy = Module.buildEmpty(mod.slot)
|
||||
dummy.position = index
|
||||
self[index] = dummy
|
||||
|
||||
@classmethod
|
||||
def buildEmpty(cls, slot):
|
||||
empty = Module(None)
|
||||
|
||||
@@ -50,9 +50,8 @@ from gui.preferenceDialog import PreferenceDialog
|
||||
from gui.graphFrame import GraphFrame
|
||||
from gui.copySelectDialog import CopySelectDialog
|
||||
from gui.utils.clipboard import toClipboard, fromClipboard
|
||||
from gui.fleetBrowser import FleetBrowser # Noqa - TODO: unsure if this is needed here
|
||||
from gui.updateDialog import UpdateDialog
|
||||
from gui.builtinViews import * # Noqa - TODO: unsure if this is needed here
|
||||
from gui.builtinViews import * # TODO: unsure if this is needed here
|
||||
from gui import graphFrame
|
||||
|
||||
from service.settings import SettingsProvider
|
||||
|
||||
@@ -28,7 +28,7 @@ from sqlalchemy.sql import or_
|
||||
import config
|
||||
import eos.db
|
||||
# TODO: Find out what this is. There is no conversions
|
||||
# from service import conversions
|
||||
from service import conversions
|
||||
from service.settings import SettingsProvider
|
||||
from service.price import Price
|
||||
|
||||
@@ -410,15 +410,13 @@ class Market():
|
||||
item = identity
|
||||
elif isinstance(identity, int):
|
||||
item = eos.db.getItem(identity, *args, **kwargs)
|
||||
# TODO: Find out what this is. There is no conversions
|
||||
"""
|
||||
# Unindent 1 tab
|
||||
elif isinstance(identity, basestring):
|
||||
# We normally lookup with string when we are using import/export
|
||||
# features. Check against overrides
|
||||
identity = conversions.all.get(identity, identity)
|
||||
item = eos.db.getItem(identity, *args, **kwargs)
|
||||
"""
|
||||
# TODO: Find out what this is. There is no conversions
|
||||
elif isinstance(identity, basestring):
|
||||
# We normally lookup with string when we are using import/export
|
||||
# features. Check against overrides
|
||||
identity = conversions.all.get(identity, identity)
|
||||
item = eos.db.getItem(identity, *args, **kwargs)
|
||||
|
||||
elif isinstance(identity, float):
|
||||
id = int(identity)
|
||||
item = eos.db.getItem(id, *args, **kwargs)
|
||||
|
||||
Reference in New Issue
Block a user