fixed a startup problem: a figure was opened without parent object (MainWindow) and led to crash before the MainApplication opened properly
This commit is contained in:
parent
0e73f21bda
commit
61c136fec3
10
QtPyLoT.py
10
QtPyLoT.py
@ -78,13 +78,18 @@ class MainWindow(QMainWindow):
|
|||||||
self.filterOptionsP = FilterOptions(**filterOptionsP)
|
self.filterOptionsP = FilterOptions(**filterOptionsP)
|
||||||
self.filterOptionsS = FilterOptions(**filterOptionsS)
|
self.filterOptionsS = FilterOptions(**filterOptionsS)
|
||||||
|
|
||||||
# initialize data
|
# UI has to be set up before(!) children widgets are
|
||||||
|
self.setupUi()
|
||||||
|
|
||||||
|
# initialize event data
|
||||||
if self.recentEvents:
|
if self.recentEvents:
|
||||||
lastEvent = self.getLastEvent()
|
lastEvent = self.getLastEvent()
|
||||||
self.data = Data(self, lastEvent)
|
self.data = Data(self, lastEvent)
|
||||||
else:
|
else:
|
||||||
self.data = Data(self)
|
self.data = Data(self)
|
||||||
self.openWaveformData()
|
|
||||||
|
# load and display waveform data
|
||||||
|
self.loadWaveformData()
|
||||||
self.dirty = False
|
self.dirty = False
|
||||||
self.loadData()
|
self.loadData()
|
||||||
self.updateFilterOptions()
|
self.updateFilterOptions()
|
||||||
@ -94,7 +99,6 @@ class MainWindow(QMainWindow):
|
|||||||
except:
|
except:
|
||||||
self.startTime = UTCDateTime()
|
self.startTime = UTCDateTime()
|
||||||
|
|
||||||
self.setupUi()
|
|
||||||
|
|
||||||
def setupUi(self):
|
def setupUi(self):
|
||||||
self.setWindowIcon(QIcon(":/icon.ico"))
|
self.setWindowIcon(QIcon(":/icon.ico"))
|
||||||
|
Loading…
Reference in New Issue
Block a user