Skip to content

Commit

Permalink
fix(data): Now only saving data in the projects .rpp file, when there…
Browse files Browse the repository at this point in the history
… is at least one preset.
  • Loading branch information
Burtan committed Jun 23, 2024
1 parent 2278e53 commit 0dbae2c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion liblpe/LivePresetsExtension.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,10 @@ bool LPE::recallState(ProjectStateContext* ctx, bool) {
void LPE::saveState(ProjectStateContext* ctx, bool) {
auto *proj = GetCurrentProjectInLoadSave();

// only save data when there are presets
if (mModels[proj].mPresets.empty())
return

WDL_FastString chunk;
mModels[proj].persist(chunk);

Expand All @@ -431,4 +435,4 @@ void LPE::resetState(bool) {
//cleaning data from ui
mController.reset();
ControlViewController_Reset(&mControlView);
}
}

0 comments on commit 0dbae2c

Please sign in to comment.