From f7d0e49458f98c4ac17c9cd357b3a454cc5475fa Mon Sep 17 00:00:00 2001 From: Marcel Paffrath Date: Tue, 6 Jun 2017 15:51:06 +0200 Subject: [PATCH] [change] some updates of main window title changed to new QtPyLoT --- QtPyLoT.py | 12 +++++++----- pylot/RELEASE-VERSION | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/QtPyLoT.py b/QtPyLoT.py index f94ef386..2f6901f7 100755 --- a/QtPyLoT.py +++ b/QtPyLoT.py @@ -1111,6 +1111,8 @@ class MainWindow(QMainWindow): # only refresh first/second tab when an event was changed. if self._eventChanged[0] or self._eventChanged[1]: event = self.get_current_event() + if not event: + return # update picks saved in GUI mainwindow (to be changed in future!!) MP MP if not event.picks: self.picks = {} @@ -2016,11 +2018,10 @@ class MainWindow(QMainWindow): def update_status(self, message, duration=5000): self.statusBar().showMessage(message, duration) if self.get_data() is not None: - if not self.get_data().isNew(): - self.setWindowTitle( - "PyLoT - processing event %s[*]" % self.get_data().getID()) - elif self.get_data().isNew(): - self.setWindowTitle("PyLoT - New project [*]") + if not self.get_current_event() or not self.project.location: + self.setWindowTitle("PyLoT - New project [*]") + elif self.get_current_event(): + self.setWindowTitle("PyLoT - [{}]".format(self.project.location)) else: self.setWindowTitle( "PyLoT - seismic processing the python way[*]") @@ -2066,6 +2067,7 @@ class MainWindow(QMainWindow): self.setDirty(True) self.project.save(filename) self.setDirty(False) + self.update_status('Creating new project...', duration=1000) return True def loadProject(self, fnm=None): diff --git a/pylot/RELEASE-VERSION b/pylot/RELEASE-VERSION index 90fc7b7b..995aa5d3 100644 --- a/pylot/RELEASE-VERSION +++ b/pylot/RELEASE-VERSION @@ -1 +1 @@ -bdc8-dirty +2030-dirty