Create a new property on Module, returns if module is projected (or None if it's not attached to a fit). Fix issues with setting charges on projected modules because the command was always looking at the literal modules on the fit (instead of projected)
This commit is contained in:
@@ -272,7 +272,13 @@ class Module(HandledItem, HandledCharge, ItemAttrShortcut, ChargeAttrShortcut):
|
||||
@property
|
||||
def modPosition(self):
|
||||
if self.owner:
|
||||
return self.owner.modules.index(self)
|
||||
return self.owner.modules.index(self) if not self.isProjected else self.owner.projectedModules.index(self)
|
||||
|
||||
@property
|
||||
def isProjected(self):
|
||||
if self.owner:
|
||||
return self in self.owner.projectedModules
|
||||
return None
|
||||
|
||||
@property
|
||||
def isCapitalSize(self):
|
||||
|
||||
Reference in New Issue
Block a user