From 669fdca6818b78dcf68352c375df4dd7b405e6b8 Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Tue, 15 Dec 2015 15:29:23 +0100 Subject: [PATCH] Temp workaround: Object mode pie glitches since 'Edit Strokes' mode was introduced To ensure all items of a pie are always at the same position, invisible dummy buttons were added for unavailable items. This caused mainly two issues: Command line printed warning because of the > 8 elements, and some modes weren't visible in some cases ('Object Mode' entry was missing in stroke edit mode). To solve this nicely, we had to support > 8 items per pie. Will look into that this week, but for now, drawing dummy buttons is disabled. From a user POV this has two ugly consequences: 1. While this temporary workaround is used, *some* pie items are positioned differently than before, 2. The 'Edit Strokes' mode entry might change its position depending on the amount of available modes. --- source/blender/editors/interface/interface_layout.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index a342b9be033..4d0c4ad863c 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -923,7 +923,17 @@ void uiItemsFullEnumO( target = uiLayoutColumn(split, layout->align); } - if (radial) { + if (0 && radial) { + /* XXX Disabled as temporary workaround! + * + * Normally, we always draw a button for all items even if they're unavailable (we draw invisible + * dummy buttons then), so items are always at the same position. This causes issues with current + * 'Object Mode' pie since more than 8 modes exist now (see T46973). + * Disabling this until more than 8 items per pie are supported (or a better solution is found). + * We should work on that ASAP though. + * + * - Julian (Dec 2015) + */ RNA_property_enum_items_gettexted_all(block->evil_C, &ptr, prop, &item_array, NULL, &free); } else { @@ -973,6 +983,7 @@ void uiItemsFullEnumO( } else { if (radial) { + /* invisible dummy button to ensure all items are always at the same position */ uiItemS(target); } else {