summaryrefslogtreecommitdiff
path: root/src/wx/text_panel.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2023-01-27 13:41:49 +0100
committerCarl Hetherington <cth@carlh.net>2023-01-27 13:41:49 +0100
commit7aab34abcab28ca38a5354dec075b56d430e82db (patch)
treea7a02355bb4ea08cdf652ccb89b4ee6d1247b5dd /src/wx/text_panel.cc
parent526829ad670c19d5466555890d8afe8d7f744834 (diff)
More stack-allocated Dialog objects.
Diffstat (limited to 'src/wx/text_panel.cc')
-rw-r--r--src/wx/text_panel.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/wx/text_panel.cc b/src/wx/text_panel.cc
index ba6c07e76..630ca6944 100644
--- a/src/wx/text_panel.cc
+++ b/src/wx/text_panel.cc
@@ -781,11 +781,10 @@ TextPanel::appearance_dialog_clicked ()
auto c = _parent->selected_text ();
DCPOMATIC_ASSERT (c.size() == 1);
- auto d = new SubtitleAppearanceDialog (this, _parent->film(), c.front(), c.front()->text_of_original_type(_original_type));
- if (d->ShowModal () == wxID_OK) {
- d->apply ();
+ SubtitleAppearanceDialog dialog(this, _parent->film(), c.front(), c.front()->text_of_original_type(_original_type));
+ if (dialog.ShowModal() == wxID_OK) {
+ dialog.apply();
}
- d->Destroy ();
}