diff options
Diffstat (limited to 'src/GraphicObjects')
| -rw-r--r-- | src/GraphicObjects/Container.cs | 4 | ||||
| -rw-r--r-- | src/GraphicObjects/Group.cs | 4 | ||||
| -rw-r--r-- | src/GraphicObjects/TemplatedContainer.cs | 4 | ||||
| -rw-r--r-- | src/GraphicObjects/TemplatedControl.cs | 4 | ||||
| -rw-r--r-- | src/GraphicObjects/TemplatedGroup.cs | 13 |
5 files changed, 24 insertions, 5 deletions
diff --git a/src/GraphicObjects/Container.cs b/src/GraphicObjects/Container.cs index 0b6045bb..be6774b5 100644 --- a/src/GraphicObjects/Container.cs +++ b/src/GraphicObjects/Container.cs @@ -50,8 +50,10 @@ namespace Crow if (t == null) { Assembly a = Assembly.GetEntryAssembly (); foreach (Type expT in a.GetExportedTypes ()) { - if (expT.Name == subTree.Name) + if (expT.Name == subTree.Name) { t = expT; + break; + } } } GraphicObject go = (GraphicObject)Activator.CreateInstance(t); diff --git a/src/GraphicObjects/Group.cs b/src/GraphicObjects/Group.cs index a285e282..3c509185 100644 --- a/src/GraphicObjects/Group.cs +++ b/src/GraphicObjects/Group.cs @@ -337,8 +337,10 @@ namespace Crow if (t == null) { Assembly a = Assembly.GetEntryAssembly (); foreach (Type expT in a.GetExportedTypes ()) { - if (expT.Name == subTree.Name) + if (expT.Name == subTree.Name) { t = expT; + break; + } } } if (t == null) diff --git a/src/GraphicObjects/TemplatedContainer.cs b/src/GraphicObjects/TemplatedContainer.cs index 44c2ad08..f4243588 100644 --- a/src/GraphicObjects/TemplatedContainer.cs +++ b/src/GraphicObjects/TemplatedContainer.cs @@ -84,8 +84,10 @@ namespace Crow if (t == null) { Assembly a = Assembly.GetEntryAssembly (); foreach (Type expT in a.GetExportedTypes ()) { - if (expT.Name == xr.Name) + if (expT.Name == xr.Name) { t = expT; + break; + } } } if (t == null) diff --git a/src/GraphicObjects/TemplatedControl.cs b/src/GraphicObjects/TemplatedControl.cs index ba49f44f..4a3a2507 100644 --- a/src/GraphicObjects/TemplatedControl.cs +++ b/src/GraphicObjects/TemplatedControl.cs @@ -154,8 +154,10 @@ namespace Crow if (t == null) { Assembly a = Assembly.GetEntryAssembly (); foreach (Type expT in a.GetExportedTypes ()) { - if (expT.Name == xr.Name) + if (expT.Name == xr.Name) { t = expT; + break; + } } } GraphicObject go = (GraphicObject)Activator.CreateInstance (t); diff --git a/src/GraphicObjects/TemplatedGroup.cs b/src/GraphicObjects/TemplatedGroup.cs index a1941f06..4c35197f 100644 --- a/src/GraphicObjects/TemplatedGroup.cs +++ b/src/GraphicObjects/TemplatedGroup.cs @@ -272,8 +272,10 @@ namespace Crow if (t == null) { Assembly a = Assembly.GetEntryAssembly (); foreach (Type expT in a.GetExportedTypes ()) { - if (expT.Name == xr.Name) + if (expT.Name == xr.Name) { t = expT; + break; + } } } if (t == null) @@ -385,6 +387,15 @@ namespace Crow else { foreach (string it in ItemTemplates.Keys) { Type t = Type.GetType (it); + if (t == null) { + Assembly a = Assembly.GetEntryAssembly (); + foreach (Type expT in a.GetExportedTypes ()) { + if (expT.Name == it) { + t = expT; + break; + } + } + } if (t == null) continue; if (t.IsAssignableFrom (dataType)) {//TODO:types could be cached |