Fix T84698: error adding movie clip tracks

The movie clip's `region->v2d` was being resized by the view2d code,
causing mouse cursor to movie-clip coordinate mapping to fail.

This commit removes `UI_view2d_region_reinit`,
matching the behavior for the image editor's 2D view.

Reviewed By: sergey

Ref D10106
This commit is contained in:
Campbell Barton 2021-01-19 20:29:05 +11:00
parent 418cd7c4ba
commit a86bb2594f
Notes: blender-bot 2023-02-14 04:07:50 +01:00
Referenced by issue #84698, Adding tracks in the movie-clip editor creates the second track in the wrong position when the view is cropped.
2 changed files with 4 additions and 3 deletions

View File

@ -880,7 +880,8 @@ static void clip_main_region_init(wmWindowManager *wm, ARegion *region)
{
wmKeyMap *keymap;
UI_view2d_region_reinit(&region->v2d, V2D_COMMONVIEW_STANDARD, region->winx, region->winy);
/* NOTE: don't use `UI_view2d_region_reinit(&region->v2d, ...)`
* since the space clip manages own v2d in #movieclip_main_area_set_view2d */
/* mask polls mode */
keymap = WM_keymap_ensure(wm->defaultconf, "Mask Editing", 0, 0);

View File

@ -603,8 +603,8 @@ static void image_main_region_init(wmWindowManager *wm, ARegion *region)
{
wmKeyMap *keymap;
/* Image space manages own v2d. */
// UI_view2d_region_reinit(&region->v2d, V2D_COMMONVIEW_STANDARD, region->winx, region->winy);
/* NOTE: don't use `UI_view2d_region_reinit(&region->v2d, ...)`
* since the space clip manages own v2d in #image_main_region_set_view2d */
/* mask polls mode */
keymap = WM_keymap_ensure(wm->defaultconf, "Mask Editing", 0, 0);