diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-09-01 20:42:01 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-09-01 20:42:01 +0200 |
| commit | 69326e73b29be371dacbdacd741a0a88a5ef1a5b (patch) | |
| tree | e2766e3cf8eb2be0f0bdcb77bbbd7e52aff3229d /src/wx/editable_list.h | |
| parent | 09287979ce90e809880cd17fb20deb23669f68e4 (diff) | |
Fix two more badly-adapted instantiations of EditableList and make
it harder to make similar errors in the future.
Diffstat (limited to 'src/wx/editable_list.h')
| -rw-r--r-- | src/wx/editable_list.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/wx/editable_list.h b/src/wx/editable_list.h index bd8909048..902d1ccbb 100644 --- a/src/wx/editable_list.h +++ b/src/wx/editable_list.h @@ -61,6 +61,13 @@ namespace EditableListButton }; +enum class EditableListTitle +{ + VISIBLE, + INVISIBLE +}; + + /** @param T type of things being edited. * @param S dialog to edit a thing. * @param get Function to get a std::vector of the things being edited. @@ -77,7 +84,7 @@ public: std::function<std::vector<T> ()> get, std::function<void (std::vector<T>)> set, std::function<std::string (T, int)> column, - bool title, + EditableListTitle title, int buttons ) : wxPanel (parent) @@ -91,7 +98,7 @@ public: SetSizer (_sizer); long style = wxLC_REPORT | wxLC_SINGLE_SEL; - if (!title) { + if (title == EditableListTitle::INVISIBLE) { style |= wxLC_NO_HEADER; } |
