forked from bartvdbraak/blender
UI: add Shift-Drag to multiselect expanded enum items too.
Differential Revision: https://developer.blender.org/D928
This commit is contained in:
parent
aaa02bd490
commit
d7e4944e5b
@ -1721,6 +1721,9 @@ bool ui_but_is_bool(const uiBut *but)
|
|||||||
if (but->rnaprop && RNA_property_type(but->rnaprop) == PROP_BOOLEAN)
|
if (but->rnaprop && RNA_property_type(but->rnaprop) == PROP_BOOLEAN)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
if ((but->rnaprop && RNA_property_type(but->rnaprop) == PROP_ENUM) && (but->type == UI_BTYPE_ROW))
|
||||||
|
return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6353,6 +6353,7 @@ static int ui_do_button(bContext *C, uiBlock *block, uiBut *but, const wmEvent *
|
|||||||
case UI_BTYPE_TOGGLE_N:
|
case UI_BTYPE_TOGGLE_N:
|
||||||
case UI_BTYPE_CHECKBOX:
|
case UI_BTYPE_CHECKBOX:
|
||||||
case UI_BTYPE_CHECKBOX_N:
|
case UI_BTYPE_CHECKBOX_N:
|
||||||
|
case UI_BTYPE_ROW:
|
||||||
retval = ui_do_but_TOG(C, but, data, event);
|
retval = ui_do_but_TOG(C, but, data, event);
|
||||||
break;
|
break;
|
||||||
case UI_BTYPE_SCROLL:
|
case UI_BTYPE_SCROLL:
|
||||||
@ -6375,7 +6376,6 @@ static int ui_do_button(bContext *C, uiBlock *block, uiBut *but, const wmEvent *
|
|||||||
break;
|
break;
|
||||||
case UI_BTYPE_ROUNDBOX:
|
case UI_BTYPE_ROUNDBOX:
|
||||||
case UI_BTYPE_LABEL:
|
case UI_BTYPE_LABEL:
|
||||||
case UI_BTYPE_ROW:
|
|
||||||
case UI_BTYPE_IMAGE:
|
case UI_BTYPE_IMAGE:
|
||||||
case UI_BTYPE_PROGRESS_BAR:
|
case UI_BTYPE_PROGRESS_BAR:
|
||||||
case UI_BTYPE_NODE_SOCKET:
|
case UI_BTYPE_NODE_SOCKET:
|
||||||
|
@ -362,7 +362,8 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but)
|
|||||||
|
|
||||||
/* special case enum rna buttons */
|
/* special case enum rna buttons */
|
||||||
if ((but->type & UI_BTYPE_ROW) && but->rnaprop && RNA_property_flag(but->rnaprop) & PROP_ENUM_FLAG) {
|
if ((but->type & UI_BTYPE_ROW) && but->rnaprop && RNA_property_flag(but->rnaprop) & PROP_ENUM_FLAG) {
|
||||||
BLI_strncpy(data->lines[data->totline], IFACE_("(Shift-click to select multiple)"), sizeof(data->lines[0]));
|
BLI_strncpy(data->lines[data->totline], IFACE_("(Shift-Click/Drag to select multiple)"),
|
||||||
|
sizeof(data->lines[0]));
|
||||||
|
|
||||||
data->format[data->totline].color_id = UI_TIP_LC_NORMAL;
|
data->format[data->totline].color_id = UI_TIP_LC_NORMAL;
|
||||||
data->totline++;
|
data->totline++;
|
||||||
|
@ -5474,7 +5474,7 @@ void RNA_def_scene(BlenderRNA *brna)
|
|||||||
RNA_def_property_boolean_sdna(prop, NULL, "lay", 1);
|
RNA_def_property_boolean_sdna(prop, NULL, "lay", 1);
|
||||||
RNA_def_property_array(prop, 20);
|
RNA_def_property_array(prop, 20);
|
||||||
RNA_def_property_boolean_funcs(prop, NULL, "rna_Scene_layer_set");
|
RNA_def_property_boolean_funcs(prop, NULL, "rna_Scene_layer_set");
|
||||||
RNA_def_property_ui_text(prop, "Layers", "Visible layers - Shift-Click to select multiple layers");
|
RNA_def_property_ui_text(prop, "Layers", "Visible layers - Shift-Click/Drag to select multiple layers");
|
||||||
RNA_def_property_update(prop, NC_SCENE | ND_LAYER, "rna_Scene_layer_update");
|
RNA_def_property_update(prop, NC_SCENE | ND_LAYER, "rna_Scene_layer_update");
|
||||||
|
|
||||||
/* active layer */
|
/* active layer */
|
||||||
|
Loading…
Reference in New Issue
Block a user