From e5a27192e7883a33976b36a7d0b832e00ded7617 Mon Sep 17 00:00:00 2001 From: Harley Acheson Date: Thu, 21 Mar 2024 15:34:22 -0700 Subject: [PATCH 1/2] Forced push after failed rebase and merge. --- .../editors/space_outliner/outliner_draw.cc | 27 +++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/source/blender/editors/space_outliner/outliner_draw.cc b/source/blender/editors/space_outliner/outliner_draw.cc index 60c8f3eee36..8d771c85317 100644 --- a/source/blender/editors/space_outliner/outliner_draw.cc +++ b/source/blender/editors/space_outliner/outliner_draw.cc @@ -2189,6 +2189,31 @@ static void outliner_draw_mode_column_toggle(uiBlock *block, return; } + int icon; + const char *tip; + + if (ob->mode == OB_MODE_OBJECT && BKE_object_is_in_editmode(ob)) { + /* Another object has our (shared) data in edit mode, so nothing we can change. */ + icon = UI_icon_from_object_mode(ob_active->mode); + tip = TIP_("Shared data already in edit mode"); + uiBut *but = uiDefIconBut(block, + UI_BTYPE_BUT, + 0, + icon, + 0, + te->ys, + UI_UNIT_X, + UI_UNIT_Y, + nullptr, + 0.0, + 0.0, + 0.0, + 0.0, + tip); + UI_but_flag_enable(but, UI_BUT_DISABLED); + return; + } + bool draw_active_icon = ob->mode == ob_active->mode; /* When not locking object modes, objects can remain in non-object modes. For modes that do not @@ -2202,8 +2227,6 @@ static void outliner_draw_mode_column_toggle(uiBlock *block, const bool object_data_shared = (ob->data == ob_active->data); draw_active_icon = draw_active_icon || object_data_shared; - int icon; - const char *tip; if (draw_active_icon) { icon = UI_icon_from_object_mode(ob_active->mode); tip = object_data_shared ? TIP_("Change the object in the current mode") : -- 2.30.2 From 3965369fa3cb7b73d6f80046c875ee36c7ed1320 Mon Sep 17 00:00:00 2001 From: Harley Acheson Date: Fri, 22 Mar 2024 10:08:20 -0700 Subject: [PATCH 2/2] Change of tooltip text, move some variables around --- .../blender/editors/space_outliner/outliner_draw.cc | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/source/blender/editors/space_outliner/outliner_draw.cc b/source/blender/editors/space_outliner/outliner_draw.cc index 8d771c85317..3d096379597 100644 --- a/source/blender/editors/space_outliner/outliner_draw.cc +++ b/source/blender/editors/space_outliner/outliner_draw.cc @@ -2189,17 +2189,12 @@ static void outliner_draw_mode_column_toggle(uiBlock *block, return; } - int icon; - const char *tip; - if (ob->mode == OB_MODE_OBJECT && BKE_object_is_in_editmode(ob)) { /* Another object has our (shared) data in edit mode, so nothing we can change. */ - icon = UI_icon_from_object_mode(ob_active->mode); - tip = TIP_("Shared data already in edit mode"); uiBut *but = uiDefIconBut(block, UI_BTYPE_BUT, 0, - icon, + UI_icon_from_object_mode(ob_active->mode), 0, te->ys, UI_UNIT_X, @@ -2209,7 +2204,7 @@ static void outliner_draw_mode_column_toggle(uiBlock *block, 0.0, 0.0, 0.0, - tip); + TIP_("Another object has this shared data in edit mode")); UI_but_flag_enable(but, UI_BUT_DISABLED); return; } @@ -2227,6 +2222,8 @@ static void outliner_draw_mode_column_toggle(uiBlock *block, const bool object_data_shared = (ob->data == ob_active->data); draw_active_icon = draw_active_icon || object_data_shared; + int icon; + const char *tip; if (draw_active_icon) { icon = UI_icon_from_object_mode(ob_active->mode); tip = object_data_shared ? TIP_("Change the object in the current mode") : -- 2.30.2