From aa1102fc536bd7b3a2cff703d79713c454af7e6c Mon Sep 17 00:00:00 2001 From: trollodel <33117082+trollodel@users.noreply.github.com> Date: Wed, 17 Nov 2021 21:08:55 +0100 Subject: Store panels and docks singletons in their own classes --- editor/import_dock.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'editor/import_dock.cpp') diff --git a/editor/import_dock.cpp b/editor/import_dock.cpp index 10654cfe43..419688fd9f 100644 --- a/editor/import_dock.cpp +++ b/editor/import_dock.cpp @@ -91,6 +91,8 @@ public: } }; +ImportDock *ImportDock::singleton = nullptr; + void ImportDock::set_edit_path(const String &p_path) { Ref config; config.instantiate(); @@ -606,6 +608,7 @@ void ImportDock::initialize_import_options() const { } ImportDock::ImportDock() { + singleton = this; set_name("Import"); content = memnew(VBoxContainer); @@ -687,5 +690,6 @@ ImportDock::ImportDock() { } ImportDock::~ImportDock() { + singleton = nullptr; memdelete(params); } -- cgit v1.2.3