summaryrefslogtreecommitdiff
path: root/src/wx/text_panel.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/text_panel.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/text_panel.h')
-rw-r--r--src/wx/text_panel.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/wx/text_panel.h b/src/wx/text_panel.h
index e89b9a54d..3c6e183dc 100644
--- a/src/wx/text_panel.h
+++ b/src/wx/text_panel.h
@@ -19,19 +19,19 @@
*/
-#include "content_sub_panel.h"
-#include "fonts_dialog.h"
-#include "text_view.h"
#include "lib/job.h"
+#include "content_sub_panel.h"
+#include "wx_ptr.h"
class CheckBox;
class Choice;
+class wxSpinCtrl;
class LanguageTagWidget;
+class TextView;
+class FontsDialog;
class SpinCtrl;
class SubtitleAnalysis;
-class TextView;
-class wxSpinCtrl;
class TextPanel : public ContentSubPanel
@@ -100,9 +100,9 @@ private:
wxStaticText* _stream_label;
wxChoice* _stream;
wxButton* _text_view_button;
- boost::optional<TextView> _text_view;
+ wx_ptr<TextView> _text_view;
wxButton* _fonts_dialog_button;
- boost::optional<FontsDialog> _fonts_dialog;
+ wx_ptr<FontsDialog> _fonts_dialog;
wxButton* _appearance_dialog_button;
TextType _original_type;
wxStaticText* _language_label = nullptr;