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.
This commit is contained in:
2018-03-02 20:01:49 +11:00
parent 8153f89518
commit e1f1567b56
4 changed files with 14 additions and 13 deletions

View File

@@ -135,7 +135,7 @@ void ED_scene_change_update(
Object *obact_old = OBACT(layer_old);
if (obact_old && (obact_new != obact_old)) {
bool obact_old_is_active =
ED_workspace_object_mode_in_other_window(bmain->wm.first, workspace, obact_old, NULL);
ED_workspace_object_mode_in_other_window(bmain->wm.first, win, obact_old, NULL);
if (obact_old && (obact_old_is_active == false)) {
EvaluationContext eval_ctx;
CTX_data_eval_ctx(C, &eval_ctx);
@@ -162,7 +162,7 @@ void ED_scene_change_update(
else {
eObjectMode object_mode_set = OB_MODE_OBJECT;
if (ED_workspace_object_mode_in_other_window(
bmain->wm.first, workspace, obact_new, &object_mode_set))
bmain->wm.first, win, obact_new, &object_mode_set))
{
workspace->object_mode = object_mode_set;
}