Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-03-02 12:01:49 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-03-02 12:01:49 +0300
commite1f1567b5657190d2da2d4a8df49995e0e515d0c (patch)
tree36609be0c429543c048bf5ee97e3fe9008acd8de /source/blender/editors/object/object_select.c
parent8153f89518b4a16852f3e3039e46bc06e82d1d23 (diff)
WorkSpace: ED_workspace_object_mode_in_other_window check other windows
The same workspace can have different active objects depending on the window. So check other windows.
Diffstat (limited to 'source/blender/editors/object/object_select.c')
-rw-r--r--source/blender/editors/object/object_select.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c
index 3d65ca628f9..f416f499b6a 100644
--- a/source/blender/editors/object/object_select.c
+++ b/source/blender/editors/object/object_select.c
@@ -124,13 +124,15 @@ void ED_object_base_activate(bContext *C, Base *base)
{
ViewLayer *view_layer = CTX_data_view_layer(C);
+ wmWindowManager *wm = CTX_wm_manager(C);
+ wmWindow *win = CTX_wm_window(C);
WorkSpace *workspace = CTX_wm_workspace(C);
eObjectMode object_mode = workspace->object_mode;
eObjectMode object_mode_set = OB_MODE_OBJECT;
if (base && ED_workspace_object_mode_in_other_window(
- CTX_wm_manager(C), workspace, base->object,
+ wm, win, base->object,
&object_mode_set))
{
/* Sync existing object mode with workspace. */
@@ -146,13 +148,12 @@ void ED_object_base_activate(bContext *C, Base *base)
* Not correct because it's possible other work-spaces use these.
* although that's a corner case. */
if (workspace->object_mode & OB_MODE_ALL_MODE_DATA) {
- wmWindowManager *wm = CTX_wm_manager(C);
EvaluationContext eval_ctx;
CTX_data_eval_ctx(C, &eval_ctx);
FOREACH_OBJECT_BEGIN(view_layer, ob) {
if (ob != obact) {
if (ED_object_mode_generic_has_data(&eval_ctx, ob) &&
- ED_workspace_object_mode_in_other_window(wm, workspace, ob, NULL) == false)
+ ED_workspace_object_mode_in_other_window(wm, win, ob, NULL) == false)
{
ED_object_mode_generic_exit(&eval_ctx, workspace, scene, ob);
}