Skip to content

Commit

Permalink
attempt to fix bug in gui2 listbox filters.
Browse files Browse the repository at this point in the history
  • Loading branch information
gfgtdf committed Mar 10, 2016
1 parent 7b23a39 commit 1667e86
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/gui/widgets/generator.cpp
Expand Up @@ -38,9 +38,10 @@ void tone::set_item_shown(const unsigned index, const bool show)
} else if(!show && is_selected(index)) {
do_deselect_item(index);

for(unsigned i = index + 1; i < get_item_count(); ++i) {
if(get_item_shown(i)) {
do_select_item(i);
for(unsigned i = 1; i < get_item_count(); ++i) {
unsigned new_index = (index + i) % get_item_count();
if(get_item_shown(new_index)) {
do_select_item(new_index);
break;
}
}
Expand Down

0 comments on commit 1667e86

Please sign in to comment.