1
0
miroir de https://github.com/microtherion/VocalEasel.git synchronisé 2025-05-15 09:14:29 +00:00

Draw everything after coordinate recalc

Cette révision appartient à :
Matthias Neeracher 2007-04-16 04:47:27 +00:00
Parent a5f43d16d1
révision 9869a2deeb

@ -492,17 +492,17 @@ VLMusicElement sSemi2Accidental[12][12] = {
- (void)drawRect:(NSRect)rect
{
if (fNeedsRecalc || [self inLiveResize])
if (fNeedsRecalc || [self inLiveResize]) {
[self recalculateDimensions];
rect = [self bounds];
}
size_t stanzas = [self song]->CountStanzas();
const float kLineW = fClefKeyW + fMeasPerSystem*fMeasureW;
for (int system = 0; system<fNumSystems; ++system) {
const float kSystemY = [self systemY:system];
if (!NSIntersectsRect(rect,
NSMakeRect(kLineX, kSystemY+kClefY,
kLineW, kSystemH-kClefY)
))
NSRect systemRect = NSMakeRect(kLineX, kSystemY+kClefY, kLineW, kSystemH-kClefY);
if (!NSIntersectsRect(rect, systemRect))
continue; // This system does not need to be drawn
//
// When highlighting, draw highlight FIRST and then draw our stuff