diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-02-25 01:53:48 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-02-25 13:04:08 +0100 |
| commit | 6d3086dd78a35bdc179a6579e23f8b5816347dbf (patch) | |
| tree | a47facfec259302afd6e0e690b748ad9f655548e /src/wx/text_panel.cc | |
| parent | 91c171b65e7329b90ac77442fd35b165bde70b26 (diff) | |
Fix misunderstanding of wxDialog lifetime handling.
Broken by d0308d53dd9f4d036d8c5fe8023920fcdfd43f39
wxDialog can be stack allocated if opened with ShowModal(), but not with
Show(). Go back to wx_ptr for those that are opened with Show().
Diffstat (limited to 'src/wx/text_panel.cc')
| -rw-r--r-- | src/wx/text_panel.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/wx/text_panel.cc b/src/wx/text_panel.cc index ddb5bf56d..f2055a542 100644 --- a/src/wx/text_panel.cc +++ b/src/wx/text_panel.cc @@ -689,7 +689,7 @@ TextPanel::text_view_clicked () auto decoder = decoder_factory (_parent->film(), c.front(), false, false, shared_ptr<Decoder>()); if (decoder) { - _text_view.emplace(this, _parent->film(), c.front(), c.front()->text_of_original_type(_original_type), decoder, _parent->film_viewer()); + _text_view.reset(this, _parent->film(), c.front(), c.front()->text_of_original_type(_original_type), decoder, _parent->film_viewer()); _text_view->show(); } } @@ -701,8 +701,8 @@ TextPanel::fonts_dialog_clicked () auto c = _parent->selected_text (); DCPOMATIC_ASSERT (c.size() == 1); - _fonts_dialog.emplace(this, c.front(), c.front()->text_of_original_type(_original_type)); - _fonts_dialog->Show(); + _fonts_dialog.reset(this, c.front(), c.front()->text_of_original_type(_original_type)); + _fonts_dialog->Show (); } |
