Page MenuHome

Ctrl-mousewheel over the mode-button (object interaction mode) does nothing
Confirmed, NormalPublic


System Information
Operating system: Linux-5.4.0-47-generic-x86_64-with-debian-buster-sid 64 Bits
Graphics card: GeForce GT 630/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 390.138

Blender Version
Broken: version: 2.91.0 Alpha, branch: master, commit date: 2020-09-09 20:10, hash: rB0721fbb6e1e2

Short description of error
Ctrl-mousewheel over the mode-button (object interaction mode) does nothing

Exact steps for others to reproduce the error
Open blender
Hover over the knob that sais "Object mode" in the upper left corner of 3D-view

Hold [ctrl] and roll the mousewheel
Nothing happens

Event Timeline

Philipp Oeser (lichtwerk) changed the task status from Needs Triage to Confirmed.Fri, Sep 11, 5:49 PM

Can confirm the behavor, dont think this is a bug though.

This is a bit of a special button (operator_menu_enum -- calls operators with different properties, not even sure if we would want to support CTRL+scrolling on those?)
But in a Debug build it asserts in ui_but_range_set_soft after rB298d5eb66916 -- this should not happen (though it is harmless).
Easiest way to prevent that is

3diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
4index 6a6914daf47..3eca722ec15 100644
5--- a/source/blender/editors/interface/interface_handlers.c
6+++ b/source/blender/editors/interface/interface_handlers.c
7@@ -8893,8 +8893,10 @@ static int ui_handle_button_event(bContext *C, const wmEvent *event, uiBut *but)
8 if (post_but) {
9 /* The post_but still has previous ranges (without the changes in active button considered),
10 * needs refreshing the ranges. */
11- ui_but_range_set_soft(post_but);
12- ui_but_range_set_hard(post_but);
13+ if ((but->rnaprop) || (but->poin && (but->pointype & UI_BUT_POIN_TYPES))) {
14+ ui_but_range_set_soft(post_but);
15+ ui_but_range_set_hard(post_but);
16+ }
18 button_activate_init(C, region, post_but, post_type);
19 }

(but the correct way would be to make sure this button does not have postbut in the first place)

Anyways, getting offtopic here, will ask for a decision of whether or not this is to be supported on these kind of special buttons: @Julian Eisel (Severin), @Hans Goudey (HooglyBoogly)
(to me, this sounds like a limitation - probably a sane limitation even - and not a bug, but will let module owners decide).

Right, as far as I know these operator enum buttons don't know about which item in their enum is active anyway, so ctrl scrolling isn't expected to work here.

That fix for the assert seems fine, might want to still check with Julian about it though.