mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Prevent emitting signals when previewing resource
This commit is contained in:
parent
6fd949a6dc
commit
e64c66c51e
1 changed files with 2 additions and 0 deletions
|
|
@ -235,11 +235,13 @@ void EditorQuickOpenDialog::preview_property() {
|
||||||
// MultiNodeEdit has adding to the undo/redo stack baked into its set function.
|
// MultiNodeEdit has adding to the undo/redo stack baked into its set function.
|
||||||
// As such, we have to specifically call a version of its setter that doesn't
|
// As such, we have to specifically call a version of its setter that doesn't
|
||||||
// create undo/redo actions.
|
// create undo/redo actions.
|
||||||
|
property_object->set_block_signals(true);
|
||||||
if (Object::cast_to<MultiNodeEdit>(property_object)) {
|
if (Object::cast_to<MultiNodeEdit>(property_object)) {
|
||||||
Object::cast_to<MultiNodeEdit>(property_object)->_set_impl(property_path, loaded_resource, "", false);
|
Object::cast_to<MultiNodeEdit>(property_object)->_set_impl(property_path, loaded_resource, "", false);
|
||||||
} else {
|
} else {
|
||||||
property_object->set(property_path, loaded_resource);
|
property_object->set(property_path, loaded_resource);
|
||||||
}
|
}
|
||||||
|
property_object->set_block_signals(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EditorQuickOpenDialog::update_property() {
|
void EditorQuickOpenDialog::update_property() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue