From 9eb8b23bb031cb50e0c5ce4f872e3c2ad39bbb77 Mon Sep 17 00:00:00 2001 From: Matthias Neeracher Date: Wed, 7 Sep 2011 05:21:06 +0200 Subject: [PATCH 1/2] Fix multiple drawing of tuplet brackets --- Sources/VLSheetViewNotes.mm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Sources/VLSheetViewNotes.mm b/Sources/VLSheetViewNotes.mm index a74ffdf..7177856 100644 --- a/Sources/VLSheetViewNotes.mm +++ b/Sources/VLSheetViewNotes.mm @@ -384,6 +384,7 @@ tupletStartX = pos.x-kNoteW*0.5f; tuplet = newTuplet; tupletDur = 0; + inTuplet = 0; } ++inTuplet; tupletDur += note->fDuration / VLNote::TupletDenom(tuplet); @@ -396,7 +397,7 @@ [self drawTuplet:tuplet bracketFrom:tupletStartX to:tupletEndX atY:tupletY]; inTuplet = 0; } - } else if (++inTuplet) { + } else if (inTuplet) { [self drawTuplet:tuplet bracketFrom:tupletStartX to:tupletEndX atY:tupletY]; inTuplet = 0; } From 2f56c3184ddce91b2bf4c826c0b518e7d3955a12 Mon Sep 17 00:00:00 2001 From: Matthias Neeracher Date: Wed, 7 Sep 2011 05:21:20 +0200 Subject: [PATCH 2/2] Shut up warning --- Sources/VLSheetView.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/VLSheetView.mm b/Sources/VLSheetView.mm index 3f73557..465d492 100644 --- a/Sources/VLSheetView.mm +++ b/Sources/VLSheetView.mm @@ -901,7 +901,7 @@ const float kSemiFloor = -1.0f*kLineH; NSResponder * hasResponder = [win firstResponder]; if ([self editTarget]) if (hasResponder != [win fieldEditor:NO forObject:nil] - || [hasResponder delegate] != fFieldEditor + || [(id)hasResponder delegate] != fFieldEditor ) [win makeFirstResponder:fFieldEditor]; }