Cleanup: remove some unnecessary includes.
[dcpomatic.git] / src / wx / editable_list.h
index 902d1ccbbf213e7c53288cd1066579de58222348..aea15eb9025db8d73a4496c1d5a342552343c578 100644 (file)
@@ -232,7 +232,7 @@ private:
 
        void add_clicked ()
        {
-               S* dialog = new S (this);
+               auto dialog = make_wx<S>(this);
 
                if (dialog->ShowModal() == wxID_OK) {
                        auto const v = dialog->get ();
@@ -244,8 +244,6 @@ private:
                                _set (all);
                        }
                }
-
-               dialog->Destroy ();
        }
 
        void edit_clicked ()
@@ -258,7 +256,7 @@ private:
                std::vector<T> all = _get ();
                DCPOMATIC_ASSERT (item >= 0 && item < int (all.size ()));
 
-               S* dialog = new S (this);
+               auto dialog = make_wx<S>(this);
                dialog->set (all[item]);
                if (dialog->ShowModal() == wxID_OK) {
                        auto const v = dialog->get ();
@@ -269,7 +267,6 @@ private:
 
                        all[item] = v.get ();
                }
-               dialog->Destroy ();
 
                for (size_t i = 0; i < _columns.size(); ++i) {
                        _list->SetItem (item, i, std_to_wx (_column (all[item], i)));