diff --git a/source/blender/editors/armature/bone_collections.cc b/source/blender/editors/armature/bone_collections.cc index b1b7b377560..761eca63af3 100644 --- a/source/blender/editors/armature/bone_collections.cc +++ b/source/blender/editors/armature/bone_collections.cc @@ -1166,8 +1166,9 @@ static int move_to_collection_regular_invoke(bContext *C, wmOperator *op) static int move_to_new_collection_invoke(bContext *C, wmOperator *op) { + RNA_string_set(op->ptr, "new_collection_name", IFACE_("Bones")); return WM_operator_props_dialog_popup( - C, op, 200, IFACE_("Move to New Collection"), IFACE_("Move")); + C, op, 200, IFACE_("Move to New Bone Collection"), IFACE_("Move")); } static int move_to_collection_invoke(bContext *C, wmOperator *op, const wmEvent * /*event*/) diff --git a/source/blender/editors/interface/interface_handlers.cc b/source/blender/editors/interface/interface_handlers.cc index e6ad01bc0a7..aa1b1fc9852 100644 --- a/source/blender/editors/interface/interface_handlers.cc +++ b/source/blender/editors/interface/interface_handlers.cc @@ -5440,6 +5440,11 @@ static int ui_do_but_NUM( else if (ELEM(event->type, EVT_PADENTER, EVT_RETKEY) && event->val == KM_PRESS) { click = 1; } + else if (event->type == EVT_BUT_OPEN) { + /* Handle UI_but_focus_on_enter_event. */ + button_activate_state(C, but, BUTTON_STATE_TEXT_EDITING); + retval = WM_UI_HANDLER_BREAK; + } else if (event->type == EVT_MINUSKEY && event->val == KM_PRESS) { button_activate_state(C, but, BUTTON_STATE_NUM_EDITING); data->value = -data->value; diff --git a/source/blender/editors/interface/interface_templates.cc b/source/blender/editors/interface/interface_templates.cc index 6feea95bb57..0626a2630f3 100644 --- a/source/blender/editors/interface/interface_templates.cc +++ b/source/blender/editors/interface/interface_templates.cc @@ -2816,7 +2816,7 @@ static eAutoPropButsReturn template_operator_property_buts_draw_single( * - this is used for allowing operators with popups to rename stuff with fewer clicks */ if (is_popup) { - if ((but->rnaprop == op->type->prop) && (but->type == UI_BTYPE_TEXT)) { + if ((but->rnaprop == op->type->prop) && (ELEM(but->type, UI_BTYPE_TEXT, UI_BTYPE_NUM))) { UI_but_focus_on_enter_event(CTX_wm_window(C), but); } } diff --git a/source/blender/editors/space_image/image_ops.cc b/source/blender/editors/space_image/image_ops.cc index d2e291b0025..8c4f3ad9198 100644 --- a/source/blender/editors/space_image/image_ops.cc +++ b/source/blender/editors/space_image/image_ops.cc @@ -2683,7 +2683,8 @@ void IMAGE_OT_new(wmOperatorType *ot) ot->flag = OPTYPE_UNDO; /* properties */ - RNA_def_string(ot->srna, "name", IMA_DEF_NAME, MAX_ID_NAME - 2, "Name", "Image data-block name"); + ot->prop = RNA_def_string( + ot->srna, "name", IMA_DEF_NAME, MAX_ID_NAME - 2, "Name", "Image data-block name"); prop = RNA_def_int(ot->srna, "width", 1024, 1, INT_MAX, "Width", "Image width", 1, 16384); RNA_def_property_subtype(prop, PROP_PIXEL); prop = RNA_def_int(ot->srna, "height", 1024, 1, INT_MAX, "Height", "Image height", 1, 16384); diff --git a/source/blender/editors/space_text/text_ops.cc b/source/blender/editors/space_text/text_ops.cc index 01b3d13cb18..273b120fb46 100644 --- a/source/blender/editors/space_text/text_ops.cc +++ b/source/blender/editors/space_text/text_ops.cc @@ -2460,8 +2460,6 @@ static int text_jump_invoke(bContext *C, wmOperator *op, const wmEvent * /*event void TEXT_OT_jump(wmOperatorType *ot) { - PropertyRNA *prop; - /* identifiers */ ot->name = "Jump"; ot->idname = "TEXT_OT_jump"; @@ -2473,8 +2471,9 @@ void TEXT_OT_jump(wmOperatorType *ot) ot->poll = text_edit_poll; /* properties */ - prop = RNA_def_int(ot->srna, "line", 1, 1, INT_MAX, "Line", "Line number to jump to", 1, 10000); - RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_TEXT); + ot->prop = RNA_def_int( + ot->srna, "line", 1, 1, INT_MAX, "Line", "Line number to jump to", 1, 10000); + RNA_def_property_translation_context(ot->prop, BLT_I18NCONTEXT_ID_TEXT); } /** \} */ diff --git a/source/blender/windowmanager/intern/wm_operators.cc b/source/blender/windowmanager/intern/wm_operators.cc index 7011dcdf371..8016c706e9a 100644 --- a/source/blender/windowmanager/intern/wm_operators.cc +++ b/source/blender/windowmanager/intern/wm_operators.cc @@ -1842,7 +1842,8 @@ static void WM_OT_debug_menu(wmOperatorType *ot) ot->exec = wm_debug_menu_exec; ot->poll = WM_operator_winactive; - RNA_def_int(ot->srna, "debug_value", 0, SHRT_MIN, SHRT_MAX, "Debug Value", "", -10000, 10000); + ot->prop = RNA_def_int( + ot->srna, "debug_value", 0, SHRT_MIN, SHRT_MAX, "Debug Value", "", -10000, 10000); } /** \} */