Automatically set parent family in individual, when adding child to the family.
[familia.git] / src / storage / storage.c
index 9f74f90d1025bf6a65740d5db48b3ee93279d3c0..272e6af264ce7ca41d34393a1f4b9ac6cc79e005 100644 (file)
@@ -6,6 +6,9 @@
 
 struct familia_storage * _familia_storage_current;
 
+extern void _familia_storage_positions_init();
+extern void _familia_storage_positions_free();
+
 struct familia_storage * familia_storage_get_current()
 {
        return _familia_storage_current;
@@ -31,6 +34,8 @@ struct familia_storage * familia_storage_new()
        storage->families = NULL;
        storage->families_no = 0;
 
+       _familia_storage_positions_init();
+
        return storage;
 }
 
@@ -57,6 +62,8 @@ void familia_storage_free(struct familia_storage * storage)
                storage->families = NULL;
                storage->families_no = 0;
        }
+
+       _familia_storage_positions_free();
 }
 
 void familia_storage_add_individual(struct familia_storage * storage, struct familia_individual * individual)