mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 22:00:10 +00:00
Add error message to Quick Open dialog if callback is invalid
This commit is contained in:
parent
6fd949a6dc
commit
ab49047604
1 changed files with 9 additions and 0 deletions
|
|
@ -252,6 +252,15 @@ void EditorQuickOpenDialog::update_property() {
|
|||
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());
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue