summaryrefslogtreecommitdiff
path: root/tikzit/src/common/NodeStyle.m
diff options
context:
space:
mode:
authorAlex Merry <alex.merry@cs.ox.ac.uk>2013-02-04 14:45:56 +0000
committerAlex Merry <alex.merry@cs.ox.ac.uk>2013-02-04 14:45:56 +0000
commit19e555267a2170d38e77e563192bfafe20d2f5c5 (patch)
tree526dff96fc68289ba6ff932f16dfe748b8991f11 /tikzit/src/common/NodeStyle.m
parentfe1b43c7b7c83e392b60ffc71ac29f7e63810f58 (diff)
Only change style settings when OK is clicked
If the user clicks Cancel, nothing changes.
Diffstat (limited to 'tikzit/src/common/NodeStyle.m')
-rw-r--r--tikzit/src/common/NodeStyle.m10
1 files changed, 10 insertions, 0 deletions
diff --git a/tikzit/src/common/NodeStyle.m b/tikzit/src/common/NodeStyle.m
index 268715b..f81d7eb 100644
--- a/tikzit/src/common/NodeStyle.m
+++ b/tikzit/src/common/NodeStyle.m
@@ -95,6 +95,16 @@
[super dealloc];
}
+- (void) updateFromStyle:(NodeStyle*)style {
+ [self setStrokeThickness:[style strokeThickness]];
+ [self setScale:[style scale]];
+ [self setStrokeColorRGB:[style strokeColorRGB]];
+ [self setFillColorRGB:[style fillColorRGB]];
+ [self setName:[style name]];
+ [self setShapeName:[style shapeName]];
+ [self setCategory:[style category]];
+}
+
+ (NodeStyle*)defaultNodeStyleWithName:(NSString*)nm {
return [[[NodeStyle alloc] initWithName:nm] autorelease];
}