Make Canvas::find_canvas() and Canvas::surefind_canvas() look more alike. No functio...
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Sun, 26 Oct 2008 20:02:26 +0000 (20:02 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Sun, 26 Oct 2008 20:02:26 +0000 (20:02 +0000)
git-svn-id: https://synfig.svn.sourceforge.net/svnroot/synfig@2136 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-core/trunk/src/synfig/canvas.cpp

index 5592aa0..b02053c 100644 (file)
@@ -596,7 +596,8 @@ Canvas::find_canvas(const String &id)
 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;
@@ -654,7 +655,7 @@ Canvas::find_canvas(const String &id)const
 
        // If the first character is the separator, then
        // this references the root canvas.
-       if(id.find_first_of(':')==0)
+       if(id[0]==':')
                return get_root()->find_canvas(string(id,1));
 
        // Now we know that the requested Canvas is in a child