Added accept_event() calls for SceneTreeDock and BaseButton
This commit is contained in:
parent
18023cc3ed
commit
9d7d20a978
|
@ -114,7 +114,12 @@ void SceneTreeDock::_unhandled_key_input(Ref<InputEvent> p_event) {
|
|||
_tool_selected(TOOL_COPY_NODE_PATH);
|
||||
} else if (ED_IS_SHORTCUT("scene_tree/delete", p_event)) {
|
||||
_tool_selected(TOOL_ERASE);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
||||
// Tool selection was successful, accept the event to stop propagation.
|
||||
accept_event();
|
||||
}
|
||||
|
||||
void SceneTreeDock::instance(const String &p_file) {
|
||||
|
|
|
@ -327,6 +327,7 @@ Ref<Shortcut> BaseButton::get_shortcut() const {
|
|||
void BaseButton::_unhandled_input(Ref<InputEvent> p_event) {
|
||||
if (!is_disabled() && is_visible_in_tree() && !p_event->is_echo() && shortcut.is_valid() && shortcut->is_shortcut(p_event)) {
|
||||
on_action_event(p_event);
|
||||
accept_event();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue