diff options
| author | Joel Klinghed <the_jk@yahoo.com> | 2017-07-28 23:29:11 +0200 |
|---|---|---|
| committer | Joel Klinghed <the_jk@yahoo.com> | 2017-07-28 23:29:11 +0200 |
| commit | f38d9ebb38620d1085951c2827d0d4b4c9d34bc6 (patch) | |
| tree | f6f96ae22b8aedf8ee3ed4262328b61100ea63fe /src/gui_gtk.cc | |
| parent | 29d3d1cef5272f5cba1fe573b664ea6059f05eda (diff) | |
Gtk: Fix bug when removing the first row in listmodel
Diffstat (limited to 'src/gui_gtk.cc')
| -rw-r--r-- | src/gui_gtk.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui_gtk.cc b/src/gui_gtk.cc index 12972cf..2a37306 100644 --- a/src/gui_gtk.cc +++ b/src/gui_gtk.cc @@ -382,8 +382,8 @@ void ListModelListener::rows_removed(GuiListModel*, size_t first, size_t last) { auto path = gtk_tree_path_new(); auto tree_model = GTK_TREE_MODEL(model_); - for (size_t row = last; row >= first; --row) { - gtk_tree_path_append_index(path, row); + for (size_t row = last + 1; row > first; --row) { + gtk_tree_path_append_index(path, row - 1); gtk_tree_model_row_deleted(tree_model, path); gtk_tree_path_up(path); } |
