When optimize_layers() recreates Paste Canvas layers, it needs to make sure it copies...
[synfig.git] / synfig-core / trunk / src / synfig / valuenode_bline.cpp
index 83a7c66..a8f1798 100644 (file)
@@ -1,6 +1,6 @@
 /* === S Y N F I G ========================================================= */
 /*!    \file valuenode_bline.cpp
-**     \brief Template File
+**     \brief Implementation of the "BLine" valuenode conversion.
 **
 **     $Id$
 **
@@ -53,6 +53,8 @@ using namespace synfig;
 
 /* === M A C R O S ========================================================= */
 
+#define EPSILON 0.0000001f
+
 /* === G L O B A L S ======================================================= */
 
 /* === P R O C E D U R E S ================================================= */
@@ -351,7 +353,7 @@ ValueNode_BLine::operator()(Time t)const
                assert(amount<=1.0f);
 
                // it's fully on
-               if(amount==1.0f)
+               if (amount > 1.0f - EPSILON)
                {
                        if(first_flag)
                        {
@@ -692,7 +694,8 @@ ValueNode_BLine::operator()(Time t)const
 String
 ValueNode_BLine::link_local_name(int i)const
 {
-       assert(i>=0 && (unsigned)i<list.size());
+       assert(i>=0 && i<list.size());
+
        return etl::strprintf(_("Vertex %03d"),i+1);
 }