Fix column headers, and disable event posting which was causing crash

This commit is contained in:
Ryan Holmes
2017-06-14 00:09:30 -04:00
parent 2857eff884
commit cf4d0706ae
2 changed files with 7 additions and 6 deletions

View File

@@ -313,7 +313,8 @@ class FittingView(d.Display):
self.Show(fitID is not None)
self.slotsChanged()
sFit.switchFit(fitID)
wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=fitID))
# @todo pheonix: had to disable this as it was causing a crash at the wxWidgets level. Dunno why, investigate
#wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=fitID))
event.Skip()

View File

@@ -151,11 +151,11 @@ class Display(wx.ListCtrl):
def addColumn(self, i, col):
self.activeColumns.append(col)
info = wx.ListItem()
info.m_mask = col.mask | wx.LIST_MASK_FORMAT | wx.LIST_MASK_WIDTH
info.m_image = col.imageId
info.m_text = col.columnText
info.m_width = -1
info.m_format = wx.LIST_FORMAT_LEFT
info.SetMask(col.mask | wx.LIST_MASK_FORMAT | wx.LIST_MASK_WIDTH)
info.SetImage(col.imageId)
info.SetText(col.columnText)
info.SetWidth(-1)
info.SetAlign(wx.LIST_FORMAT_LEFT)
self.InsertColumn(i, info)
col.resized = False
if i == 0 and col.size != wx.LIST_AUTOSIZE_USEHEADER: