diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-07-03 21:41:54 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-07-03 21:44:04 +0300 |
commit | b8ed75ab6dac269c848699d68a4d189b7c9a8f23 (patch) | |
tree | 2c743fd88ac1a8bb61358ad640af86b7522f6bda /source/blender/editors/screen | |
parent | 0a3e73a91fb06ca340e4de70a3ddd1ac037e9e33 (diff) |
Fix T61808: remove confusing graying out of workspace that already exist
This was meant to help users see which users are likely useful to add, but
it's not so obvious and there are cases where it's useful to re-append the
same workspace.
Diffstat (limited to 'source/blender/editors/screen')
-rw-r--r-- | source/blender/editors/screen/workspace_edit.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/source/blender/editors/screen/workspace_edit.c b/source/blender/editors/screen/workspace_edit.c index e2c4331b3ba..61b737589c8 100644 --- a/source/blender/editors/screen/workspace_edit.c +++ b/source/blender/editors/screen/workspace_edit.c @@ -434,9 +434,8 @@ static void workspace_append_button(uiLayout *layout, RNA_string_set(&opptr, "filepath", filepath); } -static void workspace_add_menu(bContext *C, uiLayout *layout, void *template_v) +static void workspace_add_menu(bContext *UNUSED(C), uiLayout *layout, void *template_v) { - Main *bmain = CTX_data_main(C); const char *app_template = template_v; bool has_startup_items = false; @@ -448,10 +447,6 @@ static void workspace_add_menu(bContext *C, uiLayout *layout, void *template_v) for (WorkSpace *workspace = startup_config->workspaces.first; workspace; workspace = workspace->id.next) { uiLayout *row = uiLayoutRow(layout, false); - if (BLI_findstring(&bmain->workspaces, workspace->id.name, offsetof(ID, name))) { - uiLayoutSetActive(row, false); - } - workspace_append_button(row, ot_append, workspace, startup_config->main); has_startup_items = true; } @@ -475,10 +470,6 @@ static void workspace_add_menu(bContext *C, uiLayout *layout, void *template_v) } uiLayout *row = uiLayoutRow(layout, false); - if (BLI_findstring(&bmain->workspaces, workspace->id.name, offsetof(ID, name))) { - uiLayoutSetActive(row, false); - } - workspace_append_button(row, ot_append, workspace, builtin_config->main); } } |