git-svn-id: https://synfig.svn.sourceforge.net/svnroot/synfig@2136
1f10aa63-cdf2-0310-b900-
c93c546f37ac
Canvas::ConstHandle
Canvas::find_canvas(const String &id)const
{
Canvas::ConstHandle
Canvas::find_canvas(const String &id)const
{
- if(is_inline() && parent_)return parent_->find_canvas(id);
+ if(is_inline() && parent_)
+ return parent_->find_canvas(id);
if(id.empty())
return this;
if(id.empty())
return this;
// If the first character is the separator, then
// this references the root canvas.
// If the first character is the separator, then
// this references the root canvas.
- if(id.find_first_of(':')==0)
return get_root()->find_canvas(string(id,1));
// Now we know that the requested Canvas is in a child
return get_root()->find_canvas(string(id,1));
// Now we know that the requested Canvas is in a child