diff --git a/src/common/SurgeStorage.cpp b/src/common/SurgeStorage.cpp index 016cdd8427a..520ba63bd6a 100644 --- a/src/common/SurgeStorage.cpp +++ b/src/common/SurgeStorage.cpp @@ -275,9 +275,9 @@ void SurgeStorage::refresh_patchlist() patch_list.clear(); refreshPatchlistAddDir(false, "patches_factory"); - patch_category_split[0] = patch_category.size(); + firstThirdPartyCategory = patch_category.size(); refreshPatchlistAddDir(false, "patches_3rdparty"); - patch_category_split[1] = patch_category.size(); + firstUserCategory = patch_category.size(); refreshPatchlistAddDir(true, ""); } diff --git a/src/common/SurgeStorage.h b/src/common/SurgeStorage.h index 4d05289597f..7522e57dfd5 100644 --- a/src/common/SurgeStorage.h +++ b/src/common/SurgeStorage.h @@ -505,8 +505,9 @@ class SurgeStorage void errorbox(string message); vector patch_category, wt_category; + int firstThirdPartyCategory; + int firstUserCategory; vector patch_list, wt_list; - int patch_category_split[2]; string wtpath; string datapath; string userDataPath; diff --git a/src/common/gui/CPatchBrowser.cpp b/src/common/gui/CPatchBrowser.cpp index 2b35b9e0383..bce8d627295 100644 --- a/src/common/gui/CPatchBrowser.cpp +++ b/src/common/gui/CPatchBrowser.cpp @@ -66,7 +66,8 @@ CMouseEventResult CPatchBrowser::onMouseDown(CPoint& where, const CButtonState& if ((!single_category) || (c == last_category)) { if (!single_category && - ((c == storage->patch_category_split[0]) || (c == storage->patch_category_split[1]))) + ((c == storage->firstThirdPartyCategory) || + (c == storage->firstUserCategory))) contextMenu->addEntry("-"); vector ctge; diff --git a/src/common/gui/SurgeGUIEditor.cpp b/src/common/gui/SurgeGUIEditor.cpp index bcddcb59304..5a86fb721c4 100644 --- a/src/common/gui/SurgeGUIEditor.cpp +++ b/src/common/gui/SurgeGUIEditor.cpp @@ -2020,7 +2020,7 @@ void SurgeGUIEditor::valueChanged(CControl* control) patchComment->setText(p.comments.c_str()); showPatchStoreDialog(&p, &synth->storage.patch_category, - synth->storage.patch_category_split[1]); + synth->storage.firstUserCategory); } break; case tag_store_cancel: