Let set_row_visible call the selection update.
When the selection changes due to hiding rows the callback for a changed value should also be called.
This commit is contained in:
parent
c636eaf402
commit
229470a84b
1 changed files with 6 additions and 0 deletions
|
@ -98,6 +98,8 @@ void tlistbox::set_row_visible(const unsigned row, const bool visible)
|
|||
twindow *window = get_window();
|
||||
assert(window);
|
||||
|
||||
const int selected_row = get_selected_row();
|
||||
|
||||
bool resize_needed;
|
||||
{
|
||||
twindow::tinvalidate_layout_blocker invalidate_layout_blocker(*window);
|
||||
|
@ -111,6 +113,10 @@ void tlistbox::set_row_visible(const unsigned row, const bool visible)
|
|||
} else {
|
||||
set_dirty();
|
||||
}
|
||||
|
||||
if(selected_row != get_selected_row() && callback_value_changed_) {
|
||||
callback_value_changed_(this);
|
||||
}
|
||||
}
|
||||
|
||||
const tgrid* tlistbox::get_row_grid(const unsigned row) const
|
||||
|
|
Loading…
Add table
Reference in a new issue