Remove .gitignore do nothing is ignored.
[synfig.git] / synfig-core / trunk / src / synfig / valuenode_reference.cpp
index aa5dacc..a235f02 100644 (file)
@@ -6,6 +6,7 @@
 **
 **     \legal
 **     Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+**     Copyright (c) 2008 Chris Moore
 **
 **     This package is free software; you can redistribute it and/or
 **     modify it under the terms of the GNU General Public License as
@@ -78,19 +79,19 @@ ValueNode_Reference::~ValueNode_Reference()
 }
 
 bool
-ValueNode_Reference::set_link_vfunc(int i,ValueNode::Handle x)
+ValueNode_Reference::set_link_vfunc(int i,ValueNode::Handle value)
 {
        assert(i>=0 && i<link_count());
 
-       if(x->get_type()!=get_type() && !PlaceholderValueNode::Handle::cast_dynamic(x))
-               return false;
-       link_=x;
-       signal_child_changed()(i);signal_value_changed()();
-       return true;
+       switch(i)
+       {
+       case 0: CHECK_TYPE_AND_SET_VALUE(link_, get_type());
+       }
+       return false;
 }
 
 ValueNode::LooseHandle
-ValueNode_Reference::get_link_vfunc(int i)const
+ValueNode_Reference::get_link_vfunc(int i __attribute__ ((unused)))const
 {
        assert(i>=0 && i<link_count());
 
@@ -139,6 +140,9 @@ ValueNode_Reference::get_link_index_from_name(const String &name)const
 ValueBase
 ValueNode_Reference::operator()(Time t)const
 {
+       if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS"))
+               printf("%s:%d operator()\n", __FILE__, __LINE__);
+
        return (*link_)(t);
 }