summaryrefslogtreecommitdiff
path: root/tikzit/src
diff options
context:
space:
mode:
Diffstat (limited to 'tikzit/src')
-rw-r--r--tikzit/src/common/Shape.m5
1 files changed, 4 insertions, 1 deletions
diff --git a/tikzit/src/common/Shape.m b/tikzit/src/common/Shape.m
index e86b122..eb466e2 100644
--- a/tikzit/src/common/Shape.m
+++ b/tikzit/src/common/Shape.m
@@ -129,11 +129,14 @@ NSDictionary *shapeDictionary = nil;
[Shape addShapesInDir:systemShapeDir to:shapeDict];
[Shape addShapesInDir:userShapeDir to:shapeDict];
+ NSDictionary *oldShapeDictionary = shapeDictionary;
shapeDictionary = shapeDict;
[[NSNotificationCenter defaultCenter]
postNotificationName:@"ShapeDictionaryReplaced"
object:self];
+
+ [oldShapeDictionary release];
}
+ (NSDictionary*)shapeDictionary {
@@ -142,7 +145,7 @@ NSDictionary *shapeDictionary = nil;
}
+ (Shape*)shapeForName:(NSString*)shapeName {
- Shape *s = [[[Shape shapeDictionary] objectForKey:shapeName] copy];
+ Shape *s = [[[self shapeDictionary] objectForKey:shapeName] copy];
return [s autorelease];
}