Skip to content

Commit

Permalink
Sort plugin list in alphabetical order (including when filtering) (#387)
Browse files Browse the repository at this point in the history
Signed-off-by: Mabel Zhang <mabel@openrobotics.org>
  • Loading branch information
mabelzhang authored Apr 14, 2022
1 parent 3cd66a8 commit aafacbf
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions include/ignition/gui/qml/PluginMenu.qml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,12 @@ Popup {
IgnSortFilterModel {
id: filteredModel

lessThan: function(left, right) {
var leftStr = left.modelData.toLowerCase();
var rightStr = right.modelData.toLowerCase();
return leftStr < rightStr;
}

filterAcceptsItem: function(item) {
var itemStr = item.modelData.toLowerCase();
var filterStr = searchField.text.toLowerCase();
Expand Down

0 comments on commit aafacbf

Please sign in to comment.