X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fsynfig%2Fvaluenode_range.cpp;h=3a8ee7f196f8e45582db473ea38dd99d32ba1961;hb=63e709f66d50c124cc0ece2325f4773ac4ae7b20;hp=86fea4b420b199f6db9b4385f5f524c59d23a5aa;hpb=c6b0c050710376d3cf99b7c083a7c47f1a0516c9;p=synfig.git diff --git a/synfig-core/trunk/src/synfig/valuenode_range.cpp b/synfig-core/trunk/src/synfig/valuenode_range.cpp index 86fea4b..3a8ee7f 100644 --- a/synfig-core/trunk/src/synfig/valuenode_range.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_range.cpp @@ -83,7 +83,7 @@ synfig::ValueNode_Range::ValueNode_Range(const ValueBase &value): break; default: assert(0); - throw runtime_error("synfig::ValueNode_Range:Bad type "+ValueBase::type_name(id)); + throw runtime_error(get_local_name()+_(":Bad type ")+ValueBase::type_local_name(id)); } assert(min_->get_type()==id); @@ -154,20 +154,10 @@ ValueNode_Range::set_link_vfunc(int i,ValueNode::Handle value) switch(i) { - case 0: - min_=value; - signal_child_changed()(i);signal_value_changed()(); - return true; - case 1: - max_=value; - signal_child_changed()(i);signal_value_changed()(); - return true; - case 2: - link_=value; - signal_child_changed()(i);signal_value_changed()(); - return true; + case 0: CHECK_TYPE_AND_SET_VALUE(min_, get_type()); + case 1: CHECK_TYPE_AND_SET_VALUE(max_, get_type()); + case 2: CHECK_TYPE_AND_SET_VALUE(link_, get_type()); } - return false; }