I think the following change fixes the bug but I'm not sure is this the right way to fix it.
=== modified file 'src/ui_basic/table.cc'
--- src/ui_basic/table.cc 2017-11-06 20:19:56 +0000
+++ src/ui_basic/table.cc 2017-12-13 18:22:48 +0000
@@ -426,7 +426,7 @@
* Args: i the entry to select
*/
void Table<void*>::select(const uint32_t i) {
- if (empty() || selection_ == i || i == no_selection_index())
+ if (empty() || i == no_selection_index()) return;
selection_ = i;
So, what happens if at least 3 items are selected (e.g index values 2 3 4 5) and two of them are unselected, but not the first one (2).
Unselect index 5: input value of i=2 is set to selection_ and selected(selection_) is called.
Unselect index 4: input value of i=2 is not set to selection_ and selected(selection_) is not called because selection_ == i.
I think the following change fixes the bug but I'm not sure is this the right way to fix it.
=== modified file 'src/ui_ basic/table. cc' basic/table. cc 2017-11-06 20:19:56 +0000 basic/table. cc 2017-12-13 18:22:48 +0000 >::select( const uint32_t i) { index() ) index() )
return;
--- src/ui_
+++ src/ui_
@@ -426,7 +426,7 @@
* Args: i the entry to select
*/
void Table<void*
- if (empty() || selection_ == i || i == no_selection_
+ if (empty() || i == no_selection_
selection_ = i;
So, what happens if at least 3 items are selected (e.g index values 2 3 4 5) and two of them are unselected, but not the first one (2).
Unselect index 5: input value of i=2 is set to selection_ and selected( selection_ ) is called. selection_ ) is not called because selection_ == i.
Unselect index 4: input value of i=2 is not set to selection_ and selected(