Skip to content

Commit

Permalink
One more fix for the create bank with fill - don't crash when no patc…
Browse files Browse the repository at this point in the history
…h matches the current filter.
  • Loading branch information
christofmuc committed Nov 2, 2024
1 parent d60e3c9 commit a7927f7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
8 changes: 7 additions & 1 deletion The-Orm/PatchView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1096,7 +1096,13 @@ void PatchView::fillList(std::shared_ptr<midikraft::PatchList> list, CreateListD
return;
}
}
if (fillParameters.fillMode == CreateListDialog::TListFillMode::Top) {

if(database_.getPatchesCount(currentFilter()) == 0) {
spdlog::error("The list can't be filled, there are no patches in the database matching the current filter.");
return;
}

if (fillParameters.fillMode == CreateListDialog::TListFillMode::Top) {
loadPage(0, (int) patchesDesired, filter, [list, finishedCallback, minimumPatches](std::vector<midikraft::PatchHolder> patches) {
// Check if we need to extend the patches list to make sure we have enough patches to make a full bank
while (patches.size() < minimumPatches) {
Expand Down
3 changes: 2 additions & 1 deletion release_notes/2.4.3.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ Fixed by just repeating the last entry to make sure the entire bank is full.
* Fixed \#354: Deleted user banks are still visible in the UI but gone after restart
* Fixed \#352: The accidental jump back to page 1 on editing a category. This was a regression but introduced with \#310 back in April 2024 with the release of 2.3.0
* Fixed \#353: Renaming a patch would not set the patch to dirty in the synth bank, and therefore sending the changed bank to the synth
did not update that patch, failing to change the name in the synth. There is more to this issue, but the main problem is fixed.
did not update that patch, failing to change the name in the synth. There is more to this issue, but the main problem is fixed.
* One more fix for the create bank with fill - don't crash when no patch matches the current filter. Thanks to @salzaverde!

0 comments on commit a7927f7

Please sign in to comment.