Fix #117116: Online manual option not working in context menu #117237
Open
Philipp Oeser
wants to merge 1 commits from
When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
lichtwerk/blender:117116_c
into main
pull from: lichtwerk/blender:117116_c
merge into: blender:main
blender:main
blender:brush-assets-project
blender:blender-v3.6-release
blender:blender-v3.3-release
blender:universal-scene-description
blender:partial-write-refactor
blender:blender-v4.1-release
blender:blender-v3.6-temp_wmoss_animrig_public
blender:temp-sculpt-dyntopo
blender:gpencil-next
blender:anim/animation-id-113594
blender:blender-v4.0-release
blender:blender-projects-basics
blender:bridge-curves
blender:sculpt-blender
blender:asset-browser-frontend-split
blender:asset-shelf
blender:tmp-usd-python-mtl
blender:tmp-usd-3.6
blender:blender-v3.5-release
blender:blender-v2.93-release
blender:realtime-clock
blender:sculpt-dev
blender:bevelv2
blender:xr-dev
When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
1 Commits
Author | SHA1 | Message | Date |
---|---|---|---|
Philipp Oeser | f0ed536672 |
Fix #117116: Online manual option not working in context menu
This was the case when the context menu was spawned from a button in a menu that was in turn spawned via `WM_OT_call_menu`. Then, `UI_context_active_but_get` (or `UI_context_active_but_get_respect_menu` even) are not getting an active button. Reason for this is that the current context region (or the region stored in the popup) is freed from its blocks _somewhere_ along the way when actually executing the operator. The code around nested menus is a bit hard to follow, the underlying issue (not having a valid region in context to work with at all times) should definitely be solved (for another reason, see NOTE / DOWNSIDE below). However, there is another way to solve this, and this is calling `doc_view_manual` directly with its `doc_id` set already (the `doc_id` is already available when building the context menu, used for the `Online Python Reference`). NOTE: the same failure is true for `Copy Python Command` -- and the "workaround fix" is a bit more work there (it does not have a vairiant **not** using the context buttons). DOWNSIDE: we loose the shortcut (F1) shown in the context menu, because that still needs to point to `doc_view_manual_ui_context` |