projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
809f6dd
)
Fix some crashiness on removing things from EditableList.
author
Carl Hetherington
<cth@carlh.net>
Sat, 17 Aug 2013 22:15:00 +0000
(23:15 +0100)
committer
Carl Hetherington
<cth@carlh.net>
Sat, 17 Aug 2013 22:15:00 +0000
(23:15 +0100)
src/wx/editable_list.h
patch
|
blob
|
history
diff --git
a/src/wx/editable_list.h
b/src/wx/editable_list.h
index 5eb46e80d11caabe372df5b399d776f8d1d1fdf8..98e7d0bfd64509ba503db48cba2a8db9113bb6bf 100644
(file)
--- 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)