Browse Source

fix: fixed re-render bug in tab measures

Matthias Uiberacker 5 years ago
parent
commit
372ff29ddf
1 changed files with 6 additions and 0 deletions
  1. 6 0
      src/MusicalScore/Graphical/VexFlow/VexFlowMeasure.ts

+ 6 - 0
src/MusicalScore/Graphical/VexFlow/VexFlowMeasure.ts

@@ -34,6 +34,7 @@ import {PlacementEnum} from "../../VoiceData/Expressions/AbstractExpression";
 import {VexFlowGraphicalNote} from "./VexFlowGraphicalNote";
 import {AutoBeamOptions} from "../../../OpenSheetMusicDisplay/OSMDOptions";
 import {NoteType, Arpeggio} from "../../VoiceData";
+import { VexFlowTabMeasure } from "./VexFlowTabMeasure";
 
 export class VexFlowMeasure extends GraphicalMeasure {
     constructor(staff: Staff, sourceMeasure: SourceMeasure = undefined, staffLine: StaffLine = undefined) {
@@ -110,6 +111,11 @@ export class VexFlowMeasure extends GraphicalMeasure {
         this.connectors = [];
         // Clean up instructions
         this.resetLayout();
+
+        // clean also tab measure if present:
+        if (this.tabMeasure !== undefined) {
+            (this.tabMeasure as VexFlowTabMeasure).clean();
+        }
     }
 
     /**