diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-01-30 16:22:02 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-01-30 16:22:02 +0400 |
commit | 54223ed05b7e2840865b5e46ed6d43573ff2b4ae (patch) | |
tree | 318ecb1a6b2afa8278829f06dfb0a50c0de06b36 /source/blender/editors | |
parent | c8015a27888a4c87360b1af158fc9b70bd4112ae (diff) |
Add active region for operator execution.
This means you can for example, uv unwrap in quad-view and change settings in the toolbar without defaulting back to the first quad-view region available.
This may be displayed to the user later, for now this is set on executing registrable operators.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/space_view3d/space_view3d.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_toolbar.c | 2 | ||||
-rw-r--r-- | source/blender/editors/util/undo.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c index b2d58cf41de..658196a1bd4 100644 --- a/source/blender/editors/space_view3d/space_view3d.c +++ b/source/blender/editors/space_view3d/space_view3d.c @@ -146,7 +146,7 @@ RegionView3D *ED_view3d_context_rv3d(bContext *C) if (rv3d == NULL) { ScrArea *sa = CTX_wm_area(C); if (sa && sa->spacetype == SPACE_VIEW3D) { - ARegion *ar = BKE_area_find_region_type(sa, RGN_TYPE_WINDOW); + ARegion *ar = BKE_area_find_region_active_win(sa); if (ar) { rv3d = ar->regiondata; } diff --git a/source/blender/editors/space_view3d/view3d_toolbar.c b/source/blender/editors/space_view3d/view3d_toolbar.c index 30e6e934d21..bb5b7aa6911 100644 --- a/source/blender/editors/space_view3d/view3d_toolbar.c +++ b/source/blender/editors/space_view3d/view3d_toolbar.c @@ -110,7 +110,7 @@ static void view3d_panel_operator_redo(const bContext *C, Panel *pa) /* keep in sync with logic in ED_undo_operator_repeat() */ ar = CTX_wm_region(C); - ar1 = BKE_area_find_region_type(CTX_wm_area(C), RGN_TYPE_WINDOW); + ar1 = BKE_area_find_region_active_win(CTX_wm_area(C)); if (ar1) CTX_wm_region_set((bContext *)C, ar1); diff --git a/source/blender/editors/util/undo.c b/source/blender/editors/util/undo.c index e3d35807862..8a0ef06ef12 100644 --- a/source/blender/editors/util/undo.c +++ b/source/blender/editors/util/undo.c @@ -341,7 +341,7 @@ int ED_undo_operator_repeat(bContext *C, struct wmOperator *op) /* keep in sync with logic in view3d_panel_operator_redo() */ ARegion *ar = CTX_wm_region(C); - ARegion *ar1 = BKE_area_find_region_type(CTX_wm_area(C), RGN_TYPE_WINDOW); + ARegion *ar1 = BKE_area_find_region_active_win(CTX_wm_area(C)); if (ar1) CTX_wm_region_set(C, ar1); |