Formatting and layout changes
This commit is contained in:
@@ -188,13 +188,13 @@ class FittingView(d.Display):
|
||||
event.Skip()
|
||||
|
||||
def handleListDrag(self, x, y, data):
|
||||
'''
|
||||
"""
|
||||
Handles dragging of items from various pyfa displays which support it
|
||||
|
||||
data is list with two items:
|
||||
data[0] is hard-coded str of originating source
|
||||
data[1] is typeID or index of data we want to manipulate
|
||||
'''
|
||||
"""
|
||||
|
||||
if data[0] == "fitting":
|
||||
self.swapItems(x, y, int(data[1]))
|
||||
@@ -262,11 +262,11 @@ class FittingView(d.Display):
|
||||
event.Skip()
|
||||
|
||||
def fitRemoved(self, event):
|
||||
'''
|
||||
"""
|
||||
If fit is removed and active, the page is deleted.
|
||||
We also refresh the fit of the new current page in case
|
||||
delete fit caused change in stats (projected)
|
||||
'''
|
||||
"""
|
||||
fitID = event.fitID
|
||||
|
||||
if fitID == self.getActiveFit():
|
||||
@@ -358,7 +358,7 @@ class FittingView(d.Display):
|
||||
wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=self.activeFitID))
|
||||
|
||||
def addModule(self, x, y, srcIdx):
|
||||
'''Add a module from the market browser'''
|
||||
"""Add a module from the market browser"""
|
||||
|
||||
dstRow, _ = self.HitTest((x, y))
|
||||
if dstRow != -1 and dstRow not in self.blanks:
|
||||
@@ -371,7 +371,7 @@ class FittingView(d.Display):
|
||||
wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=self.mainFrame.getActiveFit()))
|
||||
|
||||
def swapCargo(self, x, y, srcIdx):
|
||||
'''Swap a module from cargo to fitting window'''
|
||||
"""Swap a module from cargo to fitting window"""
|
||||
mstate = wx.GetMouseState()
|
||||
|
||||
dstRow, _ = self.HitTest((x, y))
|
||||
@@ -385,7 +385,7 @@ class FittingView(d.Display):
|
||||
wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=self.mainFrame.getActiveFit()))
|
||||
|
||||
def swapItems(self, x, y, srcIdx):
|
||||
'''Swap two modules in fitting window'''
|
||||
"""Swap two modules in fitting window"""
|
||||
mstate = wx.GetMouseState()
|
||||
sFit = Fit.getInstance()
|
||||
fit = sFit.getFit(self.activeFitID)
|
||||
@@ -414,12 +414,12 @@ class FittingView(d.Display):
|
||||
wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=self.mainFrame.getActiveFit()))
|
||||
|
||||
def generateMods(self):
|
||||
'''
|
||||
"""
|
||||
Generate module list.
|
||||
|
||||
This also injects dummy modules to visually separate racks. These modules are only
|
||||
known to the display, and not the backend, so it's safe.
|
||||
'''
|
||||
"""
|
||||
|
||||
sFit = Fit.getInstance()
|
||||
fit = sFit.getFit(self.activeFitID)
|
||||
@@ -539,13 +539,13 @@ class FittingView(d.Display):
|
||||
self.PopupMenu(menu)
|
||||
|
||||
def click(self, event):
|
||||
'''
|
||||
"""
|
||||
Handle click event on modules.
|
||||
|
||||
This is only useful for the State column. If multiple items are selected,
|
||||
and we have clicked the State column, iterate through the selections and
|
||||
change State
|
||||
'''
|
||||
"""
|
||||
row, _, col = self.HitTestSubItem(event.Position)
|
||||
|
||||
# only do State column and ignore invalid rows
|
||||
@@ -587,12 +587,12 @@ class FittingView(d.Display):
|
||||
return self.slotColourMap.get(slot) or self.GetBackgroundColour()
|
||||
|
||||
def refresh(self, stuff):
|
||||
'''
|
||||
"""
|
||||
Displays fitting
|
||||
|
||||
Sends data to d.Display.refresh where the rows and columns are set up, then does a
|
||||
bit of post-processing (colors)
|
||||
'''
|
||||
"""
|
||||
self.Freeze()
|
||||
d.Display.refresh(self, stuff)
|
||||
|
||||
@@ -745,7 +745,7 @@ class FittingView(d.Display):
|
||||
maxWidth += columnsWidths[i]
|
||||
|
||||
mdc = wx.MemoryDC()
|
||||
mbmp = wx.EmptyBitmap(maxWidth, (maxRowHeight) * rows + padding * 4 + headerSize)
|
||||
mbmp = wx.EmptyBitmap(maxWidth, maxRowHeight * rows + padding * 4 + headerSize)
|
||||
|
||||
mdc.SelectObject(mbmp)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user