You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
Changes to to feature profile editor
Changed "Disable Editor" to "Contextual Editor Enabled" Do not show contextual editors for disabled classes.
This commit is contained in:
@@ -512,8 +512,8 @@ void EditorFeatureProfileManager::_class_list_item_selected() {
|
|||||||
option->set_cell_mode(0, TreeItem::CELL_MODE_CHECK);
|
option->set_cell_mode(0, TreeItem::CELL_MODE_CHECK);
|
||||||
option->set_editable(0, true);
|
option->set_editable(0, true);
|
||||||
option->set_selectable(0, true);
|
option->set_selectable(0, true);
|
||||||
option->set_checked(0, edited->is_class_editor_disabled(class_name));
|
option->set_checked(0, !edited->is_class_editor_disabled(class_name));
|
||||||
option->set_text(0, TTR("Disable Editor"));
|
option->set_text(0, TTR("Enable Contextual Editor"));
|
||||||
option->set_metadata(0, CLASS_OPTION_DISABLE_EDITOR);
|
option->set_metadata(0, CLASS_OPTION_DISABLE_EDITOR);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -600,7 +600,7 @@ void EditorFeatureProfileManager::_property_item_edited() {
|
|||||||
int feature_selected = md;
|
int feature_selected = md;
|
||||||
switch (feature_selected) {
|
switch (feature_selected) {
|
||||||
case CLASS_OPTION_DISABLE_EDITOR: {
|
case CLASS_OPTION_DISABLE_EDITOR: {
|
||||||
edited->set_disable_class_editor(class_name, checked);
|
edited->set_disable_class_editor(class_name, !checked);
|
||||||
_save_and_update();
|
_save_and_update();
|
||||||
_update_selected_profile();
|
_update_selected_profile();
|
||||||
} break;
|
} break;
|
||||||
|
|||||||
@@ -1475,6 +1475,9 @@ bool EditorNode::_is_class_editor_disabled_by_feature_profile(const StringName &
|
|||||||
|
|
||||||
while (class_name != StringName()) {
|
while (class_name != StringName()) {
|
||||||
|
|
||||||
|
if (profile->is_class_disabled(class_name)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
if (profile->is_class_editor_disabled(class_name)) {
|
if (profile->is_class_editor_disabled(class_name)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user