Skip to content

Commit b421646

Browse files
committed
Fix scale modifier not updating correctly
1 parent 8a1204d commit b421646

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

Applications/Note/Note.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,7 @@ void Note::ScaleSelector() {
360360
}
361361
notePadConfigs[activeConfig].scale = custom_scales[index];
362362
customScaleSlotSelected = index;
363+
scaleModifier.ChangeScalePtr(&custom_scales[index]);
363364
});
364365
scaleSelector.AddUIComponent(customScaleSelector, Point(0, 6));
365366

Applications/Note/ScaleModifier.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ class ScaleModifier : public UIComponent {
1414
this->rootColor = rootColor;
1515
}
1616

17+
void ChangeScalePtr(uint16_t* scale)
18+
{
19+
this->scale = scale;
20+
}
21+
1722
void OnChange(std::function<void(uint16_t)> changeCallback) {
1823
this->changeCallback = std::make_unique<std::function<void(uint16_t)>>(changeCallback);
1924
}

0 commit comments

Comments
 (0)