From bfcc3583d5dfa32ac2b314751e5cf99578da455d Mon Sep 17 00:00:00 2001 From: jpbruyere Date: Mon, 29 Feb 2016 11:38:45 +0100 Subject: ensure template are loaded when created in code --- src/Interface.cs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/Interface.cs') diff --git a/src/Interface.cs b/src/Interface.cs index 6e9fb8a8..527e2f28 100644 --- a/src/Interface.cs +++ b/src/Interface.cs @@ -39,6 +39,7 @@ namespace Crow internal static bool XmlSerializerInit = false; /// keep ressource path for debug msg internal static string CurrentGOMLPath = ""; + internal static int XmlLoaderCount = 0; public static int TabSize = 4; public static string LineBreak = "\r\n"; @@ -122,10 +123,12 @@ namespace Crow public static GraphicObject Load (string path, object hostClass = null) { + Interface.XmlLoaderCount ++; CurrentGOMLPath = path; using (Stream stream = GetStreamFromPath (path)) { return Load(stream, GetTopContainerOfGOMLStream(stream), hostClass); } + Interface.XmlLoaderCount --; } -- cgit v1.3.1-4-g156e