Fix ValueDesc::get_value_node() so it works with constant valuenodes too.
[synfig.git] / synfig-studio / trunk / src / synfigapp / value_desc.h
index bc4405e..841b40e 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
@@ -145,6 +146,8 @@ public:
                if(parent_is_linkable_value_node())
                        return (synfig::LinkableValueNode::Handle::cast_reinterpret(parent_value_node))->get_link(index);
 //                     return reinterpret_cast<synfig::LinkableValueNode*>(parent_value_node.get())->get_link(index);
+               if(parent_is_value_node_const())
+                       return parent_value_node;
                return 0;
        }