numere-org / NumeRe

Framework for numerical computations, data analysis and visualisation
https://www.numere.org
GNU General Public License v3.0
18 stars 6 forks source link

Improve the trees' search functionality #12

Closed numeredev closed 1 year ago

numeredev commented 1 year ago

DESCRIPTION

Is your change request related to a problem? Please describe. I want to search for an element, but there are sometimes appearing multiple of them. I can click on any of them. There does not seem to be a difference. Furthermore ,the trees' search functionality seems only to consider the entered string as a whole instead of breaking that down to multiple substrings.

Describe the solution you'd like Improve the search functionality by

Describe possible alternatives you've considered No alternative.

Additional context Migrated from here: https://sourceforge.net/p/numere/tickets/761/

(Do not write below this line)


DEVS' SECTION

ANALYSIS

The search candidates are generated within wxArrayString TreeSearchCtrl::getCandidates(const wxString& enteredText). Those contain only the name of the tree item, but could be made more unique. Furthermore, here's also the location to break multiple keywords into individual tokens.

Ensure that the new created, unique strings can be found using bool TreeSearchCtrl::selectItem(const wxString& value), otherwise double-clicking on a match in the search results won't jump to the result.

IMPLEMENTATION STEPS

(see also our Wiki for implementation guidelines)

DOCUMENTATION STEPS

(see also our Wiki for further information)

PULL REQUEST