summaryrefslogtreecommitdiff
path: root/tikzit/src/osx/GraphicsView.m
diff options
context:
space:
mode:
authorAlex Merry <dev@randomguy3.me.uk>2013-03-23 03:30:19 +0000
committerAlex Merry <dev@randomguy3.me.uk>2013-03-23 03:38:55 +0000
commit8cde489ab6c4169fb03d810447c18eea0d0eaa14 (patch)
treead3fcdc71f1819963198ae8a52fc5f2b2818cd20 /tikzit/src/osx/GraphicsView.m
parente68a44b882e5d6dbbab769f7ef20355ec53a9278 (diff)
Make the parser/lexer reentrant
No more locking! Also, the interface for TikzGraphAssembler is much simpler. Changes to OSX code are completely untested.
Diffstat (limited to 'tikzit/src/osx/GraphicsView.m')
-rw-r--r--tikzit/src/osx/GraphicsView.m6
1 files changed, 2 insertions, 4 deletions
diff --git a/tikzit/src/osx/GraphicsView.m b/tikzit/src/osx/GraphicsView.m
index d5d6186..49b1af6 100644
--- a/tikzit/src/osx/GraphicsView.m
+++ b/tikzit/src/osx/GraphicsView.m
@@ -1099,11 +1099,9 @@ static CGColorRef cgGrayColor, cgWhiteColor, cgClearColor = nil;
NSData *data = [cb dataForType:type];
NSString *tikz = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
//NSLog(@"pasting tikz:\n%@",tikz);
- TikzGraphAssembler *ass = [[TikzGraphAssembler alloc] init];
- if ([ass parseTikz:tikz]) {
+ Graph *clip = [TikzGraphAssembler parseTikz:tikz];
+ if (clip) {
//NSLog(@"tikz pasted:\n%@",tikz);
- Graph *clip = [ass graph];
-
NSRect graphBounds = [graph bounds];
NSRect clipBounds = [clip bounds];
float dx = graphBounds.origin.x +