UI: Attempt to restore region for redo from Adjust Last Operation panel #108892

Merged
Julian Eisel merged 4 commits from JulianEisel/blender:temp-hud-restore-region into main 2023-07-25 12:42:48 +02:00

4 Commits

Author SHA1 Message Date
Julian Eisel affe34732e Merge branch 'main' into temp-hud-restore-region 2023-07-25 12:39:02 +02:00
Julian Eisel 51e6606074 Address points from review 2023-07-25 12:26:33 +02:00
Julian Eisel 414b1282c9 Merge remote-tracking branch 'origin/main' into temp-hud-restore-region 2023-07-25 12:22:34 +02:00
Julian Eisel 64cae3d650 UI: Attempt to restore region for redo from Adjust Last Operation panel
The Adjust Last Operation panel would attempt to use the main region,
even when the operator was initially executed in a different region.
This becomes an issue when the operator relies on context of the region.
For example the pose library gets the active asset from context, which
is only available in the region (e.g. asset shelf) displaying the
assets. In general it seems like redo should restore the region of
invokation.

This uses the region type from the initial operator call context to
lookup a region to restore on redo. While not completely bullet proof
(multiple regions of the same type may be present), this should mitigate
the issue quite a bit.
2023-06-12 14:21:52 +02:00