Copy full project setting path from dialog.
The EditorProperty UI elements for project settings are created from
SectionedInspector, which has a prefix added to each property path. Each
EditorProperty needs to be made aware of this path so copy_property_path
copies the full path, and not just the suffix.
Fixes #59020.
(cherry picked from commit d271e2517e
)
This commit is contained in:
parent
fa08c0c858
commit
846416afe8
2 changed files with 4 additions and 1 deletions
|
@ -835,7 +835,7 @@ void EditorProperty::_menu_option(int p_option) {
|
||||||
emit_changed(property, EditorNode::get_singleton()->get_inspector()->get_property_clipboard());
|
emit_changed(property, EditorNode::get_singleton()->get_inspector()->get_property_clipboard());
|
||||||
} break;
|
} break;
|
||||||
case MENU_COPY_PROPERTY_PATH: {
|
case MENU_COPY_PROPERTY_PATH: {
|
||||||
OS::get_singleton()->set_clipboard(property);
|
OS::get_singleton()->set_clipboard(property_path);
|
||||||
} break;
|
} break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1325,6 +1325,7 @@ void EditorInspector::_parse_added_editors(VBoxContainer *current_vbox, Ref<Edit
|
||||||
if (F->get().properties.size() == 1) {
|
if (F->get().properties.size() == 1) {
|
||||||
//since it's one, associate:
|
//since it's one, associate:
|
||||||
ep->property = F->get().properties[0];
|
ep->property = F->get().properties[0];
|
||||||
|
ep->property_path = property_prefix + F->get().properties[0];
|
||||||
ep->property_usage = 0;
|
ep->property_usage = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1705,6 +1706,7 @@ void EditorInspector::update_tree() {
|
||||||
if (F->get().properties.size() == 1) {
|
if (F->get().properties.size() == 1) {
|
||||||
//since it's one, associate:
|
//since it's one, associate:
|
||||||
ep->property = F->get().properties[0];
|
ep->property = F->get().properties[0];
|
||||||
|
ep->property_path = property_prefix + F->get().properties[0];
|
||||||
ep->property_usage = p.usage;
|
ep->property_usage = p.usage;
|
||||||
//and set label?
|
//and set label?
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,6 +64,7 @@ private:
|
||||||
friend class EditorInspector;
|
friend class EditorInspector;
|
||||||
Object *object;
|
Object *object;
|
||||||
StringName property;
|
StringName property;
|
||||||
|
String property_path;
|
||||||
|
|
||||||
int property_usage;
|
int property_usage;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue