Files
test/source
Julian Eisel 952bc075ae Fix #121490: Unable to access asset from context in asset shelf
Displaying an operator in the context menu that would access the asset
via context would fail.

3 issues here in fact:
- 798219225d removed code to attach the asset to the button's context.
  Brought this back.
- If the `AssetShelf.get_active_asset()` method (in Python) isn't set,
  `AssetViewItem::should_be_active()` would always return false, making
  it impossible to lookup the active item. Instead it should return an
  empty value so the view's internal active state is used instead.
  Mistake in a700c90ec3.
- These kind of context queries can't rely on cursor coordinates, it's
  not well defined what state they are in. In fact `wmWindow.eventstate`
  is unset in debug builds to help enforce this. Also an issue from
  a700c90ec3. With the above two corrections this change can be
  undone so the query doesn't depend on cursor coordinates anymore.
2024-05-07 17:45:15 +02:00
..