Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lfo display cache fix #7947

Merged
merged 11 commits into from
Jan 3, 2025
19 changes: 19 additions & 0 deletions src/surge-xt/gui/widgets/LFOAndStepDisplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,24 @@ bool LFOAndStepDisplay::paramsHasChanged()
++p;
};

if (lfodata->rate.deactivated != settingsFromLastDrawCall[0].b)
{
settingsFromLastDrawCall[0].b = lfodata->rate.deactivated;
hasChanged = true;
}

if (lfodata->deform.deform_type != paramsFromLastDrawCall[1].i)
{
paramsFromLastDrawCall[1].i = lfodata->deform.deform_type;
hasChanged = true;
}

if (lfodata->rate.temposync != paramsFromLastDrawCall[2].b)
{
paramsFromLastDrawCall[2].b = lfodata->rate.temposync;
hasChanged = true;
}

if (lfoStorageFromLastDrawingCall != lfodata)
hasChanged = true;

Expand Down Expand Up @@ -1728,6 +1746,7 @@ void LFOAndStepDisplay::onSkinChanged()
{
return;
}
forceRepaint = true;
auto typesWithHover = skin->standardHoverAndHoverOnForIDB(IDB_LFO_TYPE, associatedBitmapStore);
typeImg = typesWithHover[0];
typeImgHover = typesWithHover[1];
Expand Down
1 change: 1 addition & 0 deletions src/surge-xt/gui/widgets/LFOAndStepDisplay.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ struct LFOAndStepDisplay : public juce::Component,
bool forceRepaint;
LFOStorage *lfoStorageFromLastDrawingCall;
pdata paramsFromLastDrawCall[n_scene_params];
pdata settingsFromLastDrawCall[8];
int zoomFactorFromLastDrawCall;

bool paramsHasChanged();
Expand Down
Loading