From 5412de82490f8cf0c20c94c057289c53d5304397 Mon Sep 17 00:00:00 2001 From: Marcel Paffrath Date: Mon, 12 Jun 2017 11:34:45 +0200 Subject: [PATCH] [add] notes can be read from event folders --- QtPyLoT.py | 13 ++++++++++++- pylot/RELEASE-VERSION | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/QtPyLoT.py b/QtPyLoT.py index 8e84cccb..9f271d8d 100755 --- a/QtPyLoT.py +++ b/QtPyLoT.py @@ -2371,9 +2371,20 @@ class Event(object): self.notes = '' self._testEvent = False self._refEvent = False + try: + self.get_notes() + except: + pass + + def get_notes(self): + notesfile = os.path.join(self.path, 'notes.txt') + if os.path.isfile(notesfile): + with open(notesfile) as infile: + text = '[eventInfo: '+str(infile.readlines()[0].split('\n')[0])+']' + self.addNotes(text) def addNotes(self, notes): - self.notes = notes + self.notes = str(notes) def clearNotes(self): self.notes = None diff --git a/pylot/RELEASE-VERSION b/pylot/RELEASE-VERSION index 401c7fd7..6d6e8843 100644 --- a/pylot/RELEASE-VERSION +++ b/pylot/RELEASE-VERSION @@ -1 +1 @@ -a2c7-dirty +dded-dirty