mirror of https://github.com/GNOME/gimp.git
app: trim out trailing whitespaces from item names.
Trailing whitespaces are a bother because they are not easily spotted and there are no good reasons to have any on an item name.
This commit is contained in:
parent
3b88a346f1
commit
123c605da7
|
@ -646,6 +646,14 @@ gimp_item_tree_uniquefy_name (GimpItemTree *tree,
|
|||
gimp_object_set_name (GIMP_OBJECT (item), new_name);
|
||||
}
|
||||
|
||||
/* Remove any trailing whitespace. */
|
||||
if (gimp_object_get_name (item))
|
||||
{
|
||||
gchar *name = g_strchomp (g_strdup (gimp_object_get_name (item)));
|
||||
|
||||
gimp_object_take_name (GIMP_OBJECT (item), name);
|
||||
}
|
||||
|
||||
if (g_hash_table_lookup (private->name_hash,
|
||||
gimp_object_get_name (item)))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue