Remove .gitignore do nothing is ignored.
[synfig.git] / synfig-core / trunk / src / synfig / valuenode_timestring.cpp
index 0198716..a0808aa 100644 (file)
@@ -57,7 +57,7 @@ ValueNode_TimeString::ValueNode_TimeString(const ValueBase &value):
        switch(value.get_type())
        {
        case ValueBase::TYPE_STRING:
-               set_link("time",ValueNode_Const::create(Time()));
+               set_link("time",ValueNode_Const::create(Time(0)));
                break;
        default:
                throw Exception::BadType(ValueBase::type_local_name(value.get_type()));
@@ -86,12 +86,18 @@ ValueNode_TimeString::~ValueNode_TimeString()
 ValueBase
 ValueNode_TimeString::operator()(Time t)const
 {
+       if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS"))
+               printf("%s:%d operator()\n", __FILE__, __LINE__);
+
        Time time((*time_)(t).get(Time()));
 
        switch (get_type())
        {
        case ValueBase::TYPE_STRING:
-               return time.get_string(get_parent_canvas()->rend_desc().get_frame_rate());
+               if (get_root_canvas())
+                       return time.get_string(get_root_canvas()->rend_desc().get_frame_rate());
+               else
+                       return time.get_string();
        default:
                break;
        }