Browse Source

Fixed adding notes twice to graphicalVoiceEntry.

Matthias Uiberacker 7 years ago
parent
commit
308086974c

+ 0 - 4
src/MusicalScore/Graphical/GraphicalNote.ts

@@ -36,10 +36,6 @@ export class GraphicalNote extends GraphicalObject {
     public parentVoiceEntry: GraphicalVoiceEntry;
     public numberOfDots: number;
 
-    public get ParentList(): GraphicalNote[] {
-        return this.parentVoiceEntry.notes;
-    }
-
     public Transpose(keyInstruction: KeyInstruction, activeClef: ClefInstruction, halfTones: number, octaveEnum: OctaveEnum): Pitch {
         let transposedPitch: Pitch = this.sourceNote.Pitch;
         if (MusicSheetCalculator.transposeCalculator !== undefined) {

+ 2 - 4
src/MusicalScore/Graphical/VexFlow/VexFlowGraphicalSymbolFactory.ts

@@ -98,10 +98,8 @@ export class VexFlowGraphicalSymbolFactory implements IGraphicalSymbolFactory {
      */
     public createNote(note: Note, graphicalVoiceEntry: GraphicalVoiceEntry,
                       activeClef: ClefInstruction, octaveShift: OctaveEnum = OctaveEnum.NONE,  graphicalNoteLength: Fraction = undefined): GraphicalNote {
-        // Creates the note:
-        const graphicalNote: GraphicalNote = new VexFlowGraphicalNote(note, graphicalVoiceEntry, activeClef, octaveShift, graphicalNoteLength);
-        graphicalVoiceEntry.notes.push(graphicalNote);
-        return graphicalNote;
+        // Creates and returns the note:
+        return new VexFlowGraphicalNote(note, graphicalVoiceEntry, activeClef, octaveShift, graphicalNoteLength);
     }
 
     /**