mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 22:00:10 +00:00
Merge pull request #112559 from Meorge/bugfix/need-valid-callable-instant-preview
Add error message to Quick Open dialog if callback is invalid
This commit is contained in:
commit
499254e495
1 changed files with 9 additions and 0 deletions
|
|
@ -254,6 +254,15 @@ void EditorQuickOpenDialog::update_property() {
|
||||||
property_object->set(property_path, initial_property_value);
|
property_object->set(property_path, initial_property_value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!item_selected_callback.is_valid()) {
|
||||||
|
String err_msg = "The callback provided to the Quick Open dialog was invalid.";
|
||||||
|
if (_is_instant_preview_active()) {
|
||||||
|
err_msg += " Try disabling \"Instant Preview\" as a workaround.";
|
||||||
|
}
|
||||||
|
ERR_FAIL_MSG(err_msg);
|
||||||
|
}
|
||||||
|
|
||||||
item_selected_callback.call(container->get_selected());
|
item_selected_callback.call(container->get_selected());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue