From cf4d0706ae743683a0ef6dd1a9ba280e687c98f3 Mon Sep 17 00:00:00 2001 From: Ryan Holmes Date: Wed, 14 Jun 2017 00:09:30 -0400 Subject: [PATCH] Fix column headers, and disable event posting which was causing crash --- gui/builtinViews/fittingView.py | 3 ++- gui/display.py | 10 +++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/gui/builtinViews/fittingView.py b/gui/builtinViews/fittingView.py index 25a228bbb..a24ac9143 100644 --- a/gui/builtinViews/fittingView.py +++ b/gui/builtinViews/fittingView.py @@ -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() diff --git a/gui/display.py b/gui/display.py index 173b5fa40..9b2b161df 100644 --- a/gui/display.py +++ b/gui/display.py @@ -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: