From 95cf8c2d30ca46b8aa34fdb95c42f7241adcce93 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Mon, 4 May 2020 16:18:20 +0200 Subject: [PATCH] Fuzzy matching of parameters in the search box: Fix of https://github.com/forrestthewoods/lib_fts/issues/21 finally applied, disabled CamelCase matching as we are not using CamelCase in Slicer parameters. --- src/slic3r/GUI/fts_fuzzy_match.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/fts_fuzzy_match.h b/src/slic3r/GUI/fts_fuzzy_match.h index c4ef62e3a..6d26965a1 100644 --- a/src/slic3r/GUI/fts_fuzzy_match.h +++ b/src/slic3r/GUI/fts_fuzzy_match.h @@ -93,7 +93,7 @@ namespace fts { // Recursion count is input / output to track the maximum depth reached. // Was given by reference &recursionCount, see discussion in https://github.com/forrestthewoods/lib_fts/issues/21 // int & recursionCount, - int & recursionCount, + int recursionCount, int recursionLimit) { // Count recursions @@ -202,10 +202,12 @@ namespace fts { if (i > 0 && currIdx == matches[i - 1] + 1) // Sequential outScore += sequential_bonus; +/* // Camel case char_type prev = strBegin[currIdx - 1]; if (std::islower(prev) && std::isupper(strBegin[currIdx])) outScore += camel_bonus; +*/ // Separator if (prev == '_' || prev == ' ') outScore += separator_bonus;