Merge pull request #114519 from mxtherfxcker/fix/CamFocusTriggeredByDoubleClickingTreeButtons

Fix camera focus triggered by double-clicking Tree buttons
This commit is contained in:
Rémi Verschelde 2026-01-31 22:50:39 +01:00
commit 0dec4ab393
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -4218,7 +4218,7 @@ void Tree::gui_input(const Ref<InputEvent> &p_event) {
if (rtl) {
pressing_pos.x = get_size().width - pressing_pos.x;
}
} else if (mb->is_double_click() && get_item_at_position(mb->get_position()) != nullptr) {
} else if (mb->is_double_click() && cache.click_type != Cache::CLICK_BUTTON && get_item_at_position(mb->get_position()) != nullptr) {
emit_signal(SNAME("item_icon_double_clicked"));
}