Fix 1795913. Subtract now works with colors.
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Sun, 16 Sep 2007 22:06:58 +0000 (22:06 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Sun, 16 Sep 2007 22:06:58 +0000 (22:06 +0000)
git-svn-id: http://svn.voria.com/code@682 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-core/trunk/src/synfig/valuenode_subtract.cpp

index 0372731..a541edc 100644 (file)
@@ -75,8 +75,11 @@ ValueNode_Subtract::create(const ValueBase& x)
        {
        case ValueBase::TYPE_NIL:
                return value_node;
-       case ValueBase::TYPE_ANGLE:
        case ValueBase::TYPE_COLOR:
+               value_node->set_link("lhs",ValueNode_Const::create(x.get(Color())));
+               value_node->set_link("rhs",ValueNode_Const::create(Color(0,0,0,0)));
+               break;
+       case ValueBase::TYPE_ANGLE:
        case ValueBase::TYPE_INTEGER:
        case ValueBase::TYPE_REAL:
        case ValueBase::TYPE_VECTOR: