Browse Source

Update fuzzysearchdatabase.

tags/v2.0.0
Andrew Belt 4 years ago
parent
commit
25ea79e194
2 changed files with 5 additions and 3 deletions
  1. +1
    -1
      dep/fuzzysearchdatabase
  2. +4
    -2
      src/app/ModuleBrowser.cpp

+ 1
- 1
dep/fuzzysearchdatabase

@@ -1 +1 @@
Subproject commit 797d13f6ff3b55fcdfa34149ddb766b05119ca8a
Subproject commit fe62479811e503ef3c091f5a859d27bfcf0a44da

+ 4
- 2
src/app/ModuleBrowser.cpp View File

@@ -34,7 +34,7 @@ namespace rack {
namespace app {


static FuzzySearchDatabase<plugin::Model*> modelDb;
static fuzzysearch::Database<plugin::Model*> modelDb;
static bool modelDbInitialized = false;


@@ -520,8 +520,10 @@ struct ModuleBrowser : widget::OpaqueWidget {
modelDbInit();
// Score results against search query
auto results = modelDb.search(search);
// DEBUG("=============");
for (auto& result : results) {
prefilteredModelScores[result._key] = result._score;
prefilteredModelScores[result.key] = result.score;
// DEBUG("%s %s\t\t%f", result._key->plugin->slug.c_str(), result._key->slug.c_str(), result._score);
}
// Sort by score
modelContainer->children.sort([&](Widget *w1, Widget *w2) {


Loading…
Cancel
Save