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/dcp_panel.h | |
| 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/dcp_panel.h')
| -rw-r--r-- | src/wx/dcp_panel.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/wx/dcp_panel.h b/src/wx/dcp_panel.h index 25b7d959d..4988922a8 100644 --- a/src/wx/dcp_panel.h +++ b/src/wx/dcp_panel.h @@ -19,11 +19,7 @@ */ -#include "audio_dialog.h" -#include "dcp_timeline_dialog.h" -#include "interop_metadata_dialog.h" -#include "markers_dialog.h" -#include "smpte_metadata_dialog.h" +#include "wx_ptr.h" #include "lib/config.h" #include "lib/film_property.h" @@ -41,11 +37,15 @@ class wxSpinCtrl; class wxSizer; class wxGridBagSizer; +class AudioDialog; class Choice; +class DCPTimelineDialog; class Film; class FilmViewer; class InteropMetadataDialog; +class MarkersDialog; class Ratio; +class SMPTEMetadataDialog; class DCPPanel { @@ -158,11 +158,11 @@ private: Button* _reels; wxSizer* _audio_panel_sizer; - boost::optional<AudioDialog> _audio_dialog; - boost::optional<MarkersDialog> _markers_dialog; - boost::optional<InteropMetadataDialog> _interop_metadata_dialog; - boost::optional<SMPTEMetadataDialog> _smpte_metadata_dialog; - boost::optional<DCPTimelineDialog> _dcp_timeline; + wx_ptr<AudioDialog> _audio_dialog; + wx_ptr<MarkersDialog> _markers_dialog; + wx_ptr<InteropMetadataDialog> _interop_metadata_dialog; + wx_ptr<SMPTEMetadataDialog> _smpte_metadata_dialog; + wx_ptr<DCPTimelineDialog> _dcp_timeline; std::shared_ptr<Film> _film; FilmViewer& _viewer; |
