[add] notes can be read from event folders
This commit is contained in:
parent
ddedd3ed7a
commit
5412de8249
13
QtPyLoT.py
13
QtPyLoT.py
@ -2371,9 +2371,20 @@ class Event(object):
|
|||||||
self.notes = ''
|
self.notes = ''
|
||||||
self._testEvent = False
|
self._testEvent = False
|
||||||
self._refEvent = 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):
|
def addNotes(self, notes):
|
||||||
self.notes = notes
|
self.notes = str(notes)
|
||||||
|
|
||||||
def clearNotes(self):
|
def clearNotes(self):
|
||||||
self.notes = None
|
self.notes = None
|
||||||
|
@ -1 +1 @@
|
|||||||
a2c7-dirty
|
dded-dirty
|
||||||
|
Loading…
Reference in New Issue
Block a user