From 61c136fec3feab2f784c4206f59d650aab6ac51c Mon Sep 17 00:00:00 2001 From: Sebastian Wehling-Benatelli Date: Mon, 16 Feb 2015 10:25:51 +0100 Subject: [PATCH] fixed a startup problem: a figure was opened without parent object (MainWindow) and led to crash before the MainApplication opened properly --- QtPyLoT.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/QtPyLoT.py b/QtPyLoT.py index 29cc2490..3ad2917f 100755 --- a/QtPyLoT.py +++ b/QtPyLoT.py @@ -78,13 +78,18 @@ class MainWindow(QMainWindow): self.filterOptionsP = FilterOptions(**filterOptionsP) self.filterOptionsS = FilterOptions(**filterOptionsS) - # initialize data + # UI has to be set up before(!) children widgets are + self.setupUi() + + # initialize event data if self.recentEvents: lastEvent = self.getLastEvent() self.data = Data(self, lastEvent) else: self.data = Data(self) - self.openWaveformData() + + # load and display waveform data + self.loadWaveformData() self.dirty = False self.loadData() self.updateFilterOptions() @@ -94,7 +99,6 @@ class MainWindow(QMainWindow): except: self.startTime = UTCDateTime() - self.setupUi() def setupUi(self): self.setWindowIcon(QIcon(":/icon.ico"))