Fix 2060732: Incorrect error message when selecting a filename or canvas parameter.
authorgballintijn <gballintijn@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Fri, 22 Aug 2008 20:05:34 +0000 (20:05 +0000)
committergballintijn <gballintijn@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Fri, 22 Aug 2008 20:05:34 +0000 (20:05 +0000)
git-svn-id: https://synfig.svn.sourceforge.net/svnroot/synfig@2033 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-studio/trunk/src/gtkmm/widget_curves.cpp

index e90f53d..4b43405 100644 (file)
@@ -289,6 +289,12 @@ struct studio::Widget_Curves::CurveStruct : sigc::trackable
 
                return -channels[chan].values[time];
        }
+
+       static bool is_supported(const synfigapp::ValueDesc& x)
+       {
+               return x.get_value_type() == ValueBase::TYPE_STRING
+                       && x.get_value_type() == ValueBase::TYPE_CANVAS;
+       }
 };
 
 /* === M E T H O D S ======================================================= */
@@ -365,6 +371,9 @@ Widget_Curves::set_value_descs(std::list<synfigapp::ValueDesc> value_descs)
        std::list<synfigapp::ValueDesc>::iterator iter;
        for(iter=value_descs.begin();iter!=value_descs.end();++iter)
        {
+               if (! CurveStruct::is_supported(*iter))
+                       continue;
+
                try {
                        curve_list_.push_back(*iter);
                        if(iter->is_value_node())