summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/wx/editable_list.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/wx/editable_list.h b/src/wx/editable_list.h
index 5eb46e80d..98e7d0bfd 100644
--- a/src/wx/editable_list.h
+++ b/src/wx/editable_list.h
@@ -143,13 +143,16 @@ private:
void remove_clicked ()
{
int i = _list->GetNextItem (-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
- if (i >= 0) {
- _list->DeleteItem (i);
+ if (i == -1) {
+ return;
}
+ _list->DeleteItem (i);
std::vector<T> all = _get ();
all.erase (all.begin() + i);
_set (all);
+
+ selection_changed ();
}
void resized (wxSizeEvent& ev)