Skip to content

Commit

Permalink
Minor-Major change
Browse files Browse the repository at this point in the history
Added a check if the plugin actually read notes before checking PREV and NEXT
  • Loading branch information
UtaUtaUtau committed Aug 4, 2020
1 parent 8361e34 commit 36520c3
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pyutau.py
Original file line number Diff line number Diff line change
Expand Up @@ -495,11 +495,12 @@ def __init__(self, fpath):
setStr = line.split('=')
self.notes[-1].set_custom_data(setStr[0], setStr[1][:-1])

if self.notes[0].get_note_type() == 'PREV':
self.prev_note = self.notes.pop(0)
if self.notes:
if self.notes[0].get_note_type() == 'PREV':
self.prev_note = self.notes.pop(0)

if self.notes[-1].get_note_type() == 'NEXT':
self.next_note = self.notes.pop()
if self.notes[-1].get_note_type() == 'NEXT':
self.next_note = self.notes.pop()

def insert_note(self, idx, note):
self.notes.insert(idx, note)
Expand Down

0 comments on commit 36520c3

Please sign in to comment.