Author: Carlos Lopez <[email protected]>
Date: Thu Jan 19 19:04:38 2012 +0100
When looking up a canvas consider current canvas as candidate.
---
synfig-core/src/synfig/canvas.cpp | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/synfig-core/src/synfig/canvas.cpp
b/synfig-core/src/synfig/canvas.cpp
index 1c1b65a..d90c30c 100644
--- a/synfig-core/src/synfig/canvas.cpp
+++ b/synfig-core/src/synfig/canvas.cpp
@@ -539,7 +539,10 @@ Canvas::surefind_canvas(const String &id, String &warnings)
if(!is_absolute_path(file_name))
file_name =
get_file_path()+ETL_DIRECTORY_SEPARATOR+file_name;
-
+ // Before look up the external canvases
+ // let's check if this is the current canvas
+ if(get_file_name() == file_name)
+ return this;
// If the composition is already open, then use it.
if(externals_.count(file_name))
external_canvas=externals_[file_name];
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Synfig-devl mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synfig-devl