summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-12-04 08:33:23 +0100
committerGitHub <noreply@github.com>2021-12-04 08:33:23 +0100
commitd394cbce994d41155f6a33b795c8f6c7af640c56 (patch)
treeabdb8fa6649ab53dcb8d0d63a7559d745ad7b16d /editor
parent4f298237bf887c8540eadd47672158c04e2300dd (diff)
parent3ff78c34e74ac868672dbbb0e2d95a772a5493db (diff)
Merge pull request #55613 from YeldhamDev/base_type_none
Disable base type changing when no type is selected in the theme editor
Diffstat (limited to 'editor')
-rw-r--r--editor/plugins/theme_editor_plugin.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/plugins/theme_editor_plugin.cpp b/editor/plugins/theme_editor_plugin.cpp
index f94439f344..f62dbfc2cc 100644
--- a/editor/plugins/theme_editor_plugin.cpp
+++ b/editor/plugins/theme_editor_plugin.cpp
@@ -2581,11 +2581,11 @@ void ThemeTypeEditor::_update_type_items() {
}
// Various type settings.
- if (ClassDB::class_exists(edited_type)) {
+ if (edited_type.is_empty() || ClassDB::class_exists(edited_type)) {
type_variation_edit->set_editable(false);
type_variation_edit->set_text("");
type_variation_button->hide();
- type_variation_locked->show();
+ type_variation_locked->set_visible(!edited_type.is_empty());
} else {
type_variation_edit->set_editable(true);
type_variation_edit->set_text(edited_theme->get_type_variation_base(edited_type));