diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-01-14 22:06:05 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-01-14 22:06:05 +0100 |
| commit | 4e4968464eeef1956cb82392e1fc3b27a792ab89 (patch) | |
| tree | 79db245f320df21a075a0fd26de685e02fff6924 /src/wx/text_panel.cc | |
| parent | 0ecea9f4d1a772e99f396e47364e68abfbfe9f7f (diff) | |
Add wx_ptr and use it instead of ScopeGuard in a lot of places.
Diffstat (limited to 'src/wx/text_panel.cc')
| -rw-r--r-- | src/wx/text_panel.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wx/text_panel.cc b/src/wx/text_panel.cc index 8e7d4434e..94ec8506d 100644 --- a/src/wx/text_panel.cc +++ b/src/wx/text_panel.cc @@ -32,6 +32,7 @@ #include "subtitle_appearance_dialog.h" #include "text_panel.h" #include "text_view.h" +#include "wx_ptr.h" #include "wx_util.h" #include "lib/analyse_subtitles_job.h" #include "lib/dcp_content.h" @@ -370,8 +371,7 @@ TextPanel::dcp_track_changed () optional<DCPTextTrack> track; if (_dcp_track->GetSelection() == int(_dcp_track->GetCount()) - 1) { - auto d = new DCPTextTrackDialog (this); - ScopeGuard sg = [d]() { d->Destroy(); }; + auto d = make_wx<DCPTextTrackDialog>(this); if (d->ShowModal() == wxID_OK) { track = d->get(); } |
