Skip to content

Commit 19081a8

Browse files
committed
Merge pull request #95889 from KoBeWi/tree_growing_sideways
Allow horizontal scrolling in Tree using Shift
2 parents 0d1873d + 42e5c5b commit 19081a8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

scene/gui/tree.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4034,25 +4034,25 @@ void Tree::gui_input(const Ref<InputEvent> &p_event) {
40344034

40354035
} break;
40364036
case MouseButton::WHEEL_UP: {
4037-
if (_scroll(false, -mb->get_factor() / 8)) {
4037+
if (_scroll(mb->is_shift_pressed(), -mb->get_factor() / 8)) {
40384038
accept_event();
40394039
}
40404040

40414041
} break;
40424042
case MouseButton::WHEEL_DOWN: {
4043-
if (_scroll(false, mb->get_factor() / 8)) {
4043+
if (_scroll(mb->is_shift_pressed(), mb->get_factor() / 8)) {
40444044
accept_event();
40454045
}
40464046

40474047
} break;
40484048
case MouseButton::WHEEL_LEFT: {
4049-
if (_scroll(true, -mb->get_factor() / 8)) {
4049+
if (_scroll(!mb->is_shift_pressed(), -mb->get_factor() / 8)) {
40504050
accept_event();
40514051
}
40524052

40534053
} break;
40544054
case MouseButton::WHEEL_RIGHT: {
4055-
if (_scroll(true, mb->get_factor() / 8)) {
4055+
if (_scroll(!mb->is_shift_pressed(), mb->get_factor() / 8)) {
40564056
accept_event();
40574057
}
40584058

0 commit comments

Comments
 (0)