summaryrefslogtreecommitdiff
path: root/src/wx/content_menu.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2025-02-25 01:53:48 +0100
committerCarl Hetherington <cth@carlh.net>2025-02-25 13:04:08 +0100
commit6d3086dd78a35bdc179a6579e23f8b5816347dbf (patch)
treea47facfec259302afd6e0e690b748ad9f655548e /src/wx/content_menu.h
parent91c171b65e7329b90ac77442fd35b165bde70b26 (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/content_menu.h')
-rw-r--r--src/wx/content_menu.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wx/content_menu.h b/src/wx/content_menu.h
index a9348fe29..e7f095390 100644
--- a/src/wx/content_menu.h
+++ b/src/wx/content_menu.h
@@ -25,6 +25,7 @@
#include "auto_crop_dialog.h"
#include "timeline_content_view.h"
+#include "wx_ptr.h"
#include "lib/types.h"
#include <dcp/warnings.h>
LIBDCP_DISABLE_WARNINGS
@@ -89,7 +90,7 @@ private:
wxMenuItem* _set_dcp_markers;
wxMenuItem* _remove;
- boost::optional<AutoCropDialog> _auto_crop_dialog;
+ wx_ptr<AutoCropDialog> _auto_crop_dialog;
boost::signals2::scoped_connection _auto_crop_config_connection;
boost::signals2::scoped_connection _auto_crop_viewer_connection;
};