Skip to content

Commit a7927f7

Browse files
committed
One more fix for the create bank with fill - don't crash when no patch matches the current filter.
1 parent d60e3c9 commit a7927f7

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

The-Orm/PatchView.cpp

+7-1
Original file line numberDiff line numberDiff line change
@@ -1096,7 +1096,13 @@ void PatchView::fillList(std::shared_ptr<midikraft::PatchList> list, CreateListD
10961096
return;
10971097
}
10981098
}
1099-
if (fillParameters.fillMode == CreateListDialog::TListFillMode::Top) {
1099+
1100+
if(database_.getPatchesCount(currentFilter()) == 0) {
1101+
spdlog::error("The list can't be filled, there are no patches in the database matching the current filter.");
1102+
return;
1103+
}
1104+
1105+
if (fillParameters.fillMode == CreateListDialog::TListFillMode::Top) {
11001106
loadPage(0, (int) patchesDesired, filter, [list, finishedCallback, minimumPatches](std::vector<midikraft::PatchHolder> patches) {
11011107
// Check if we need to extend the patches list to make sure we have enough patches to make a full bank
11021108
while (patches.size() < minimumPatches) {

release_notes/2.4.3.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ Fixed by just repeating the last entry to make sure the entire bank is full.
1515
* Fixed \#354: Deleted user banks are still visible in the UI but gone after restart
1616
* 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
1717
* 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
18-
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.
18+
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.
19+
* One more fix for the create bank with fill - don't crash when no patch matches the current filter. Thanks to @salzaverde!

0 commit comments

Comments
 (0)