[dia] xfig-import: don't create a group for a single object
- From: Hans Breuer <hans src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dia] xfig-import: don't create a group for a single object
- Date: Fri, 5 Sep 2014 15:49:11 +0000 (UTC)
commit b25a1dc8a52e10311142c6857c4869b9cb493449
Author: Hans Breuer <hans breuer org>
Date: Fri Sep 5 16:14:46 2014 +0200
xfig-import: don't create a group for a single object
it's just superfluous and annoying during round-trip.
plug-ins/xfig/xfig-import.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/plug-ins/xfig/xfig-import.c b/plug-ins/xfig/xfig-import.c
index 85784b4..9c31c9a 100644
--- a/plug-ins/xfig/xfig-import.c
+++ b/plug-ins/xfig/xfig-import.c
@@ -1042,7 +1042,10 @@ fig_read_object(FILE *file, DiaContext *ctx)
}
/* Make group item with these items */
- item = create_standard_group((GList*)compound_stack->data);
+ if (g_list_length((GList*)compound_stack->data) > 1)
+ item = create_standard_group((GList*)compound_stack->data);
+ else /* a single item needs no group */
+ item = (DiaObject *)((GList*)compound_stack->data)->data;
compound_stack = g_slist_remove(compound_stack, compound_stack->data);
if (compound_stack == NULL) {
depths[compound_depth] = g_list_append(depths[compound_depth],
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]