Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/mesh/editmesh_tools.c')
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index 231e6fbc2d9..2ea68c3354a 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -3261,11 +3261,11 @@ static int edbm_merge_exec(bContext *C, wmOperator *op)
}
static const EnumPropertyItem merge_type_items[] = {
- {MESH_MERGE_FIRST, "FIRST", 0, "At First", ""},
- {MESH_MERGE_LAST, "LAST", 0, "At Last", ""},
{MESH_MERGE_CENTER, "CENTER", 0, "At Center", ""},
{MESH_MERGE_CURSOR, "CURSOR", 0, "At Cursor", ""},
{MESH_MERGE_COLLAPSE, "COLLAPSE", 0, "Collapse", ""},
+ {MESH_MERGE_FIRST, "FIRST", 0, "At First", ""},
+ {MESH_MERGE_LAST, "LAST", 0, "At Last", ""},
{0, NULL, 0, NULL, NULL},
};
@@ -3284,6 +3284,11 @@ static const EnumPropertyItem *merge_type_itemf(bContext *C,
int totitem = 0;
BMEditMesh *em = BKE_editmesh_from_object(obedit);
+ /* Keep these first so that their automatic shortcuts don't change. */
+ RNA_enum_items_add_value(&item, &totitem, merge_type_items, MESH_MERGE_CENTER);
+ RNA_enum_items_add_value(&item, &totitem, merge_type_items, MESH_MERGE_CURSOR);
+ RNA_enum_items_add_value(&item, &totitem, merge_type_items, MESH_MERGE_COLLAPSE);
+
/* Only active object supported:
* In practice it doesn't make sense to run this operation on non-active meshes
* since selecting will activate - we could have own code-path for these but it's a hassle
@@ -3305,9 +3310,6 @@ static const EnumPropertyItem *merge_type_itemf(bContext *C,
}
}
- RNA_enum_items_add_value(&item, &totitem, merge_type_items, MESH_MERGE_CENTER);
- RNA_enum_items_add_value(&item, &totitem, merge_type_items, MESH_MERGE_CURSOR);
- RNA_enum_items_add_value(&item, &totitem, merge_type_items, MESH_MERGE_COLLAPSE);
RNA_enum_item_end(&item, &totitem);
*r_free = true;