summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--editor/import_defaults_editor.cpp7
-rw-r--r--editor/import_defaults_editor.h1
-rw-r--r--editor/shader_globals_editor.cpp3
3 files changed, 7 insertions, 4 deletions
diff --git a/editor/import_defaults_editor.cpp b/editor/import_defaults_editor.cpp
index 28c595614f..43b97eb910 100644
--- a/editor/import_defaults_editor.cpp
+++ b/editor/import_defaults_editor.cpp
@@ -69,6 +69,12 @@ protected:
}
};
+void ImportDefaultsEditor::_notification(int p_what) {
+ if (p_what == NOTIFICATION_PREDELETE) {
+ inspector->edit(nullptr);
+ }
+}
+
void ImportDefaultsEditor::_reset() {
if (settings->importer.is_valid()) {
settings->values = settings->default_values;
@@ -206,6 +212,5 @@ ImportDefaultsEditor::ImportDefaultsEditor() {
}
ImportDefaultsEditor::~ImportDefaultsEditor() {
- inspector->edit(nullptr);
memdelete(settings);
}
diff --git a/editor/import_defaults_editor.h b/editor/import_defaults_editor.h
index ff85a25b00..c1becac5e9 100644
--- a/editor/import_defaults_editor.h
+++ b/editor/import_defaults_editor.h
@@ -62,6 +62,7 @@ class ImportDefaultsEditor : public VBoxContainer {
void _save();
protected:
+ void _notification(int p_what);
static void _bind_methods();
public:
diff --git a/editor/shader_globals_editor.cpp b/editor/shader_globals_editor.cpp
index a61b4aa3b9..ebef5be9ed 100644
--- a/editor/shader_globals_editor.cpp
+++ b/editor/shader_globals_editor.cpp
@@ -483,8 +483,5 @@ ShaderGlobalsEditor::ShaderGlobalsEditor() {
}
ShaderGlobalsEditor::~ShaderGlobalsEditor() {
- if (is_visible_in_tree()) {
- inspector->edit(nullptr);
- }
memdelete(interface);
}