diff options
author | don bright <hugh.m.bright@gmail.com> | 2013-03-11 17:00:15 (GMT) |
---|---|---|
committer | don bright <hugh.m.bright@gmail.com> | 2013-03-11 17:00:15 (GMT) |
commit | 6d3089032ce12b09c2987d7f39b031cbe1a5db2b (patch) | |
tree | cce6c5db4ff1374704ccfe8feeaa2d48d405f97b /src/cgaladv.cc | |
parent | 8bf53bc0199e7f6a24c9d88ad3eb0bf98d759d9c (diff) |
allow resize's autosize to apply to individual dimensions
Diffstat (limited to 'src/cgaladv.cc')
-rw-r--r-- | src/cgaladv.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/cgaladv.cc b/src/cgaladv.cc index 199ace2..94f84fd 100644 --- a/src/cgaladv.cc +++ b/src/cgaladv.cc @@ -91,7 +91,16 @@ AbstractNode *CgaladvModule::evaluate(const Context *ctx, const ModuleInstantiat if ( v.size() >= 3 ) node->newsize[2] = v[2].toDouble(); } Value autosize = c.lookup_variable("auto"); - node->autosize = autosize.toBool(); + node->autosize << false, false, false; + if ( autosize.type() == Value::VECTOR ) { + Value::VectorType v = ns.toVector(); + if ( v.size() >= 1 ) node->autosize[0] = v[0].toBool(); + if ( v.size() >= 2 ) node->autosize[1] = v[1].toBool(); + if ( v.size() >= 3 ) node->autosize[2] = v[2].toBool(); + } + else if ( autosize.type() == Value::BOOL ) { + node->autosize << true, true, true; + } } node->convexity = (int)convexity.toDouble(); |