Code

reset center coords to zero when there's no attribute
authorbuliabyak <buliabyak@users.sourceforge.net>
Thu, 26 Jan 2006 19:48:14 +0000 (19:48 +0000)
committerbuliabyak <buliabyak@users.sourceforge.net>
Thu, 26 Jan 2006 19:48:14 +0000 (19:48 +0000)
src/sp-item.cpp

index 7339160c7cb0351cb4a3f12e1cce9240257fb556..6caa46f3016b9b1959c1bd7d92ec4f65e088f50c 100644 (file)
@@ -455,11 +455,15 @@ sp_item_set(SPObject *object, unsigned key, gchar const *value)
         case SP_ATTR_TRANSFORM_CENTER_X:
             if (value) {
                 item->transform_center_x = g_strtod(value, NULL);
+            } else {
+                item->transform_center_x = 0;
             }
             break;
         case SP_ATTR_TRANSFORM_CENTER_Y:
             if (value) {
                 item->transform_center_y = g_strtod(value, NULL);
+            } else {
+                item->transform_center_y = 0;
             }
             break;
         default: