aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/GraphicObjects/TemplatedGroup.cs
diff options
context:
space:
mode:
authorjpbruyere <jp.bruyere@hotmail.com>2017-01-29 22:13:14 +0100
committerjpbruyere <jp.bruyere@hotmail.com>2017-01-29 22:13:14 +0100
commit2bbceb457f29a1410b99eebbcd42cdb386691b38 (patch)
treedfc4556205c31c66fb2b56c2ddf54694c7aa6bc2 /src/GraphicObjects/TemplatedGroup.cs
parent8a25a19ee73e8b7c0c9726bbb2ce4ec918f4e905 (diff)
crowObjs type search debug, improve type search in ItemTemplate selection
Diffstat (limited to 'src/GraphicObjects/TemplatedGroup.cs')
-rw-r--r--src/GraphicObjects/TemplatedGroup.cs13
1 files changed, 12 insertions, 1 deletions
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