Browse Source

various small stuff. typos etc.

master
Nils 4 years ago
parent
commit
cdb24b13dd
  1. 2
      engine/api.py
  2. 5
      engine/block.py
  3. 1
      engine/cursor.py
  4. 5
      engine/items.py
  5. 2
      engine/track.py

2
engine/api.py

@ -2266,7 +2266,7 @@ def pedalNotes(pedalDuration):
return False
newParts = int(self.durationGroup.baseDuration / pedalDuration)
if not newParts >= 2:
if newParts < 2:
return False
originalPitches = self.notelist #keep the actual list, not only the contents
keysig = session.data.currentTrack().state.keySignature()

5
engine/block.py

@ -341,10 +341,7 @@ class Block(object):
return result
def isAppending(self):
if self.localCursorIndex == len(self.data): #len counts from 1 and the cursorIndex from 0. So if they are the same we are one cursor position right of last item
return True
else:
return False
return self.localCursorIndex == len(self.data) #len counts from 1 and the cursorIndex from 0. So if they are the same we are one cursor position right of last item
def lilypond(self, carryLilypondRanges):
"""Called by track.lilypond(), returns a string.

1
engine/cursor.py

@ -129,7 +129,6 @@ class Cursor:
"dotOnLine": self.asDotOnLine(trackState.clef()),
"pitch" : self.pitchindex,
"lilypondPitch" : pitch.pitch2ly[self.pitchindex],
"position" : trackState.position(),
"appending" : trackState.isAppending(),
"blockindex" : trackState.blockindex,
"block" : block,

5
engine/items.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
Copyright 2020, Nils Hilbricht, Germany ( https://www.hilbricht.net )
@ -2829,6 +2828,8 @@ class ChannelChange(Item):
else:
return ""
#Note in use.
class RecordedNote(Item):
"""An intermediate item that gets created by the live recording process.
It has no Duration instance but a simple tick duration instead.
@ -2840,7 +2841,7 @@ class RecordedNote(Item):
def __init__(self, itemData):
"""Either init gets called, by creation during runtime, or instanceFromSerializedData.
That means everything in init must be matched by a loading call in instanceFromSerializedData."""
super().__init__(positionInTicks, durationInTicks )
super().__init__(positionInTicks, durationInTicks ) #TODO: that is not super._init of item. Item has no parameters!
self.positionInTicks = positionInTicks
self.durationInTicks = durationInTicks

2
engine/track.py

@ -410,7 +410,7 @@ class Track(object):
def hidden(self):
"""Is this editable or read-only (and not shown in a possible GUI).
hidden still emits playback and exports to other formats"""
return not self in self.score.tracks
return not self in self.parentData.tracks
@property
def name(self):

Loading…
Cancel
Save