Closed TimWei888 closed 4 months ago
So this is because DP_Capability is a pulldown menu, right, and this by default 0 indexes enums? I think @r-almendarez mentioned that we could come up with a custom handler in the mainwindow.py for this UI element which does a +1 to the index.
Another way of solving this would be to convert this dropdown menu to a "groupbox" since the enum and definition happens to be structured that way logically (ie, a device setting 3 is a combination of 1 and 2), and Robert's apply_groupbox_setting
already handles bitfield style (for example DP_Src_Pin_Assignments).
Which way would you prefer, Tim?
Yes. It's because the pulldown menu is 0 indexed. I prefer the groupbox way, since it doesn't need special handling of a standard GUI item. Thank you.
So this is because DP_Capability is a pulldown menu, right, and this by default 0 indexes enums? I think @r-almendarez mentioned that we could come up with a custom handler in the mainwindow.py for this UI element which does a +1 to the index.
Another way of solving this would be to convert this dropdown menu to a "groupbox" since the enum and definition happens to be structured that way logically (ie, a device setting 3 is a combination of 1 and 2), and Robert's
apply_groupbox_setting
already handles bitfield style (for example DP_Src_Pin_Assignments).Which way would you prefer, Tim?
I'll make the change and post it as a PR for review. Thanks, Tim.
DP Sink Capable should be 1 DP Source Capable should be 2 Both DP Source & Sink Capable should be 3