Full complete rework of the columnViews, Every column should now work
regardless if the type of view it was put in.
This commit is contained in:
@@ -22,14 +22,13 @@ import service
|
||||
import gui.display as d
|
||||
import gui.fittingView as fv
|
||||
import gui.marketBrowser as mb
|
||||
from gui.builtinViewColumns.activityCheckbox import ActivityCheckbox
|
||||
from gui.builtinViewColumns.state import State
|
||||
from gui.contextMenu import ContextMenu
|
||||
|
||||
class BoosterView(d.Display):
|
||||
DEFAULT_COLS = ["Activity Checkbox",
|
||||
DEFAULT_COLS = ["State",
|
||||
"attr:boosterness",
|
||||
"Name",
|
||||
]
|
||||
"Base Name"]
|
||||
|
||||
def __init__(self, parent):
|
||||
d.Display.__init__(self, parent, style=wx.LC_SINGLE_SEL)
|
||||
@@ -74,7 +73,7 @@ class BoosterView(d.Display):
|
||||
row, _ = self.HitTest(event.Position)
|
||||
if row != -1:
|
||||
col = self.getColumn(event.Position)
|
||||
if col == self.getColIndex(ActivityCheckbox):
|
||||
if col == self.getColIndex(State):
|
||||
fitID = self.mainFrame.getActiveFit()
|
||||
cFit = service.Fit.getInstance()
|
||||
cFit.toggleBooster(fitID, row)
|
||||
@@ -83,7 +82,7 @@ class BoosterView(d.Display):
|
||||
|
||||
def scheduleMenu(self, event):
|
||||
event.Skip()
|
||||
if self.getColumn(event.Position) != self.getColIndex(ActivityCheckbox):
|
||||
if self.getColumn(event.Position) != self.getColIndex(State):
|
||||
wx.CallAfter(self.spawnMenu)
|
||||
|
||||
def spawnMenu(self):
|
||||
|
||||
Reference in New Issue
Block a user