summaryrefslogtreecommitdiff
path: root/plugingui/listboxbasic.cc
diff options
context:
space:
mode:
authorJonas Suhr Christensen <jsc@umbraculum.org>2013-05-15 16:35:01 +0200
committerJonas Suhr Christensen <jsc@umbraculum.org>2013-05-15 16:35:01 +0200
commitb61c55a43c21a95234d79f6afd9a64964f5fffec (patch)
tree08407cd296dd650312f7e8036cb777483343bae2 /plugingui/listboxbasic.cc
parentcb4c17f35f597b6670bc761ad93e5a2d54b0808a (diff)
Improved filebrowser functionality:
* Directories listed first * Directories identified by "/" * Filtering out none drumkit files
Diffstat (limited to 'plugingui/listboxbasic.cc')
-rw-r--r--plugingui/listboxbasic.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugingui/listboxbasic.cc b/plugingui/listboxbasic.cc
index 9153907..f0699c7 100644
--- a/plugingui/listboxbasic.cc
+++ b/plugingui/listboxbasic.cc
@@ -92,6 +92,7 @@ void GUI::ListBoxBasic::addItems(std::vector<GUI::ListBoxBasic::Item> &is)
i++;
}
+/*
// sort
for(int x = 0; x < (int)items.size(); x++) {
for(int y = 0; y < (int)items.size(); y++) {
@@ -105,8 +106,10 @@ void GUI::ListBoxBasic::addItems(std::vector<GUI::ListBoxBasic::Item> &is)
}
}
}
+*/
if(selected == -1) setSelection((int)items.size() - 1);
+ setSelection(0);
int numitems = height() / (font.textHeight() + padding);
scroll.setRange(numitems);