WIP: UI: Change Behavior for Multi-Select Enums #104451

Draft
Germano Cavalcante wants to merge 1 commits from mano-wii/blender:no_ctrl_snap_elements into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
2 changed files with 9 additions and 9 deletions

View File

@ -741,7 +741,7 @@ static void ui_item_enum_expand_handle(bContext *C, void *arg1, void *arg2)
{
wmWindow *win = CTX_wm_window(C);
if ((win->eventstate->modifier & KM_SHIFT) == 0) {
if (win->eventstate->modifier & KM_CTRL) {
uiBut *but = (uiBut *)arg1;
const int enum_value = POINTER_AS_INT(arg2);
@ -1695,7 +1695,7 @@ void uiItemEnumO_value(uiLayout *layout,
int value)
{
wmOperatorType *ot = WM_operatortype_find(opname, false); /* print error next */
UI_OPERATOR_ERROR_RET(ot, opname, return );
UI_OPERATOR_ERROR_RET(ot, opname, return);
PointerRNA ptr;
WM_operator_properties_create_ptr(&ptr, ot);
@ -1732,7 +1732,7 @@ void uiItemEnumO_string(uiLayout *layout,
const char *value_str)
{
wmOperatorType *ot = WM_operatortype_find(opname, false); /* print error next */
UI_OPERATOR_ERROR_RET(ot, opname, return );
UI_OPERATOR_ERROR_RET(ot, opname, return);
PointerRNA ptr;
WM_operator_properties_create_ptr(&ptr, ot);
@ -1788,7 +1788,7 @@ void uiItemBooleanO(uiLayout *layout,
int value)
{
wmOperatorType *ot = WM_operatortype_find(opname, false); /* print error next */
UI_OPERATOR_ERROR_RET(ot, opname, return );
UI_OPERATOR_ERROR_RET(ot, opname, return);
PointerRNA ptr;
WM_operator_properties_create_ptr(&ptr, ot);
@ -1812,7 +1812,7 @@ void uiItemIntO(uiLayout *layout,
int value)
{
wmOperatorType *ot = WM_operatortype_find(opname, false); /* print error next */
UI_OPERATOR_ERROR_RET(ot, opname, return );
UI_OPERATOR_ERROR_RET(ot, opname, return);
PointerRNA ptr;
WM_operator_properties_create_ptr(&ptr, ot);
@ -1837,7 +1837,7 @@ void uiItemFloatO(uiLayout *layout,
{
wmOperatorType *ot = WM_operatortype_find(opname, false); /* print error next */
UI_OPERATOR_ERROR_RET(ot, opname, return );
UI_OPERATOR_ERROR_RET(ot, opname, return);
PointerRNA ptr;
WM_operator_properties_create_ptr(&ptr, ot);
@ -1862,7 +1862,7 @@ void uiItemStringO(uiLayout *layout,
{
wmOperatorType *ot = WM_operatortype_find(opname, false); /* print error next */
UI_OPERATOR_ERROR_RET(ot, opname, return );
UI_OPERATOR_ERROR_RET(ot, opname, return);
PointerRNA ptr;
WM_operator_properties_create_ptr(&ptr, ot);
@ -3594,7 +3594,7 @@ void uiItemMenuEnumFullO(uiLayout *layout,
{
wmOperatorType *ot = WM_operatortype_find(opname, false); /* print error next */
UI_OPERATOR_ERROR_RET(ot, opname, return );
UI_OPERATOR_ERROR_RET(ot, opname, return);
if (!ot->srna) {
ui_item_disabled(layout, opname);

View File

@ -808,7 +808,7 @@ static uiTooltipData *ui_tooltip_data_from_button_or_extra_icon(bContext *C,
if ((but->type & UI_BTYPE_ROW) && rnaprop && RNA_property_flag(rnaprop) & PROP_ENUM_FLAG) {
uiTooltipField *field = text_field_add(
data, uiTooltipFormat::Style::Normal, uiTooltipFormat::ColorID::Normal);
field->text = BLI_strdup(TIP_("(Shift-Click/Drag to select multiple)"));
field->text = BLI_strdup(TIP_("(Ctrl-Click to deselect other items)"));
}
}
/* Enum field label & tip. */