X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Fduck.cpp;h=e88306e1ebe5d31d70ffe48a338867b15348786f;hb=6965ba8940707105d613447e60f072549bde4ad4;hp=d682025a295c36fc46baea72dc3a8b1a4da1a18c;hpb=a0306607ec66a57fe2537e921a6772eaab606d2c;p=synfig.git diff --git a/synfig-studio/trunk/src/gtkmm/duck.cpp b/synfig-studio/trunk/src/gtkmm/duck.cpp index d682025..e88306e 100644 --- a/synfig-studio/trunk/src/gtkmm/duck.cpp +++ b/synfig-studio/trunk/src/gtkmm/duck.cpp @@ -112,16 +112,16 @@ Duck::get_data_guid()const { if(value_desc_.is_value_node()) return value_desc_.get_value_node()->get_guid(); - return GUID::hasher(get_name()); + return synfig::GUID::hasher(get_name()); } void Duck::set_name(const synfig::String &x) { name=x; - if(guid_==GUID::zero()) + if(guid_==synfig::GUID::zero()) { - guid_=GUID::hasher(name); + guid_=synfig::GUID::hasher(name); } } @@ -222,3 +222,23 @@ Duck::get_sub_trans_origin()const { return origin_duck?origin_duck->get_sub_trans_point():origin; } + +#ifdef _DEBUG +synfig::String +Duck::type_name(Type id) +{ + String ret; + + if (id & TYPE_POSITION) { if (!ret.empty()) ret += ", "; ret += "position"; } + if (id & TYPE_TANGENT ) { if (!ret.empty()) ret += ", "; ret += "tangent" ; } + if (id & TYPE_RADIUS ) { if (!ret.empty()) ret += ", "; ret += "radius" ; } + if (id & TYPE_WIDTH ) { if (!ret.empty()) ret += ", "; ret += "width" ; } + if (id & TYPE_ANGLE ) { if (!ret.empty()) ret += ", "; ret += "angle" ; } + if (id & TYPE_VERTEX ) { if (!ret.empty()) ret += ", "; ret += "vertex" ; } + + if (ret.empty()) + ret = "none"; + + return ret; +} +#endif // _DEBUG