From c5b742a06b19582d04c9c81040ee11379d1e8ff6 Mon Sep 17 00:00:00 2001 From: kobewi Date: Tue, 28 Nov 2023 14:21:18 +0100 Subject: [PATCH] Improve Control hiding in PluginConfigDialog --- editor/plugin_config_dialog.cpp | 19 ++++++++++--------- editor/plugin_config_dialog.h | 2 ++ 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/editor/plugin_config_dialog.cpp b/editor/plugin_config_dialog.cpp index 196a2186a72f..ccfe22b00f0e 100644 --- a/editor/plugin_config_dialog.cpp +++ b/editor/plugin_config_dialog.cpp @@ -146,7 +146,7 @@ void PluginConfigDialog::_notification(int p_what) { } void PluginConfigDialog::config(const String &p_config_path) { - if (p_config_path.length()) { + if (!p_config_path.is_empty()) { Ref cf = memnew(ConfigFile); Error err = cf->load(p_config_path); ERR_FAIL_COND_MSG(err != OK, "Cannot load config file from path '" + p_config_path + "'."); @@ -159,20 +159,17 @@ void PluginConfigDialog::config(const String &p_config_path) { script_edit->set_text(cf->get_value("plugin", "script", "")); _edit_mode = true; - active_edit->hide(); - Object::cast_to