mirror of
https://github.com/microtherion/VocalEasel.git
synced 2024-12-22 19:23:59 +00:00
Draw everything after coordinate recalc
This commit is contained in:
parent
a5f43d16d1
commit
9869a2deeb
|
@ -492,17 +492,17 @@ VLMusicElement sSemi2Accidental[12][12] = {
|
||||||
|
|
||||||
- (void)drawRect:(NSRect)rect
|
- (void)drawRect:(NSRect)rect
|
||||||
{
|
{
|
||||||
if (fNeedsRecalc || [self inLiveResize])
|
if (fNeedsRecalc || [self inLiveResize]) {
|
||||||
[self recalculateDimensions];
|
[self recalculateDimensions];
|
||||||
|
rect = [self bounds];
|
||||||
|
}
|
||||||
|
|
||||||
size_t stanzas = [self song]->CountStanzas();
|
size_t stanzas = [self song]->CountStanzas();
|
||||||
const float kLineW = fClefKeyW + fMeasPerSystem*fMeasureW;
|
const float kLineW = fClefKeyW + fMeasPerSystem*fMeasureW;
|
||||||
for (int system = 0; system<fNumSystems; ++system) {
|
for (int system = 0; system<fNumSystems; ++system) {
|
||||||
const float kSystemY = [self systemY:system];
|
const float kSystemY = [self systemY:system];
|
||||||
if (!NSIntersectsRect(rect,
|
NSRect systemRect = NSMakeRect(kLineX, kSystemY+kClefY, kLineW, kSystemH-kClefY);
|
||||||
NSMakeRect(kLineX, kSystemY+kClefY,
|
if (!NSIntersectsRect(rect, systemRect))
|
||||||
kLineW, kSystemH-kClefY)
|
|
||||||
))
|
|
||||||
continue; // This system does not need to be drawn
|
continue; // This system does not need to be drawn
|
||||||
//
|
//
|
||||||
// When highlighting, draw highlight FIRST and then draw our stuff
|
// When highlighting, draw highlight FIRST and then draw our stuff
|
||||||
|
|
Loading…
Reference in New Issue
Block a user