Skip to content

Commit

Permalink
When toggling case sensitivity, rebuild the search regex if necessary.
Browse files Browse the repository at this point in the history
Fixes #29
  • Loading branch information
leecbaker committed Dec 3, 2019
1 parent 38b9ee7 commit 2eacec6
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/lib/search.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,15 @@ class SearchParams {
void setSearchTerms(const std::string & terms);
void setChangeDetection(bool detection_on, bool only_big) { change_detection_ = detection_on; only_large_changes_ = only_big; }
void setIncludeRefs(bool include_crs, bool include_drs) { include_crs_ = include_crs; include_drs_ = include_drs; }
void setCaseSensitive(bool sensitive) { case_sensitive_ = sensitive; }
void setUseRegex(bool use_regex) {
void setCaseSensitive(bool sensitive) {
case_sensitive_ = sensitive;
if(use_regex_) {
buildRegex();
}
}
void setUseRegex(bool use_regex) {
regex_fail_ = false;
use_regex_ = use_regex;
use_regex_ = use_regex;
if(use_regex_) {
buildRegex();
}
Expand Down

0 comments on commit 2eacec6

Please sign in to comment.