summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2019-04-08 20:20:20 -0300
committerJuan Linietsky <reduzio@gmail.com>2019-04-08 20:20:20 -0300
commit3474e1586d765f77fec8b2658eb1b02d8813a838 (patch)
tree29134c31eaad0eb92353ac8fed3417e7fabb28ec
parenta20235aeb02c0c9e5ce58c0236f88a19865d571c (diff)
Changes to to feature profile editor
Changed "Disable Editor" to "Contextual Editor Enabled" Do not show contextual editors for disabled classes.
-rw-r--r--editor/editor_feature_profile.cpp6
-rw-r--r--editor/editor_node.cpp3
2 files changed, 6 insertions, 3 deletions
diff --git a/editor/editor_feature_profile.cpp b/editor/editor_feature_profile.cpp
index b6bd352ed2..714df44e25 100644
--- a/editor/editor_feature_profile.cpp
+++ b/editor/editor_feature_profile.cpp
@@ -512,8 +512,8 @@ void EditorFeatureProfileManager::_class_list_item_selected() {
option->set_cell_mode(0, TreeItem::CELL_MODE_CHECK);
option->set_editable(0, true);
option->set_selectable(0, true);
- option->set_checked(0, edited->is_class_editor_disabled(class_name));
- option->set_text(0, TTR("Disable Editor"));
+ option->set_checked(0, !edited->is_class_editor_disabled(class_name));
+ option->set_text(0, TTR("Enable Contextual Editor"));
option->set_metadata(0, CLASS_OPTION_DISABLE_EDITOR);
}
@@ -600,7 +600,7 @@ void EditorFeatureProfileManager::_property_item_edited() {
int feature_selected = md;
switch (feature_selected) {
case CLASS_OPTION_DISABLE_EDITOR: {
- edited->set_disable_class_editor(class_name, checked);
+ edited->set_disable_class_editor(class_name, !checked);
_save_and_update();
_update_selected_profile();
} break;
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index 97ffd9a492..c19b497ad5 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -1475,6 +1475,9 @@ bool EditorNode::_is_class_editor_disabled_by_feature_profile(const StringName &
while (class_name != StringName()) {
+ if (profile->is_class_disabled(class_name)) {
+ return true;
+ }
if (profile->is_class_editor_disabled(class_name)) {
return true;
}