aboutsummaryrefslogtreecommitdiffstatsci
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/GraphicObjects/TemplatedGroup.cs21
-rw-r--r--src/Instantiator.cs2
2 files changed, 21 insertions, 2 deletions
diff --git a/src/GraphicObjects/TemplatedGroup.cs b/src/GraphicObjects/TemplatedGroup.cs
index 1801c0e8..3c1fed9e 100644
--- a/src/GraphicObjects/TemplatedGroup.cs
+++ b/src/GraphicObjects/TemplatedGroup.cs
@@ -306,6 +306,7 @@ namespace Crow
if (cancelLoading)
return;
loadPage (i);
+ Thread.Sleep (1);
}
}
void cancelLoadingThread(){
@@ -324,7 +325,23 @@ namespace Crow
loadingTime.Start ();
#endif
- Group page = items.Clone () as Group;
+ Group page;
+ if (typeof(Wrapper).IsAssignableFrom (items.GetType ())){
+ page = items;
+ itemPerPage = int.MaxValue;
+ }else if (typeof(GenericStack).IsAssignableFrom (items.GetType ())) {
+ GenericStack gs = new GenericStack ();
+ gs.CurrentInterface = items.CurrentInterface;
+ gs.initialize ();
+ gs.Orientation = (items as GenericStack).Orientation;
+ gs.Width = items.Width;
+ gs.Height = items.Height;
+ gs.VerticalAlignment = items.VerticalAlignment;
+ gs.HorizontalAlignment = items.HorizontalAlignment;
+ page = gs;
+
+ }else
+ page = Activator.CreateInstance (items.GetType ()) as Group;
page.Name = "page" + pageNum;
@@ -337,6 +354,8 @@ namespace Crow
loadItem (i, page);
}
+ if (page == items)
+ return;
lock (CurrentInterface.LayoutMutex)
items.AddChild (page);
diff --git a/src/Instantiator.cs b/src/Instantiator.cs
index dfc585ab..5076b487 100644
--- a/src/Instantiator.cs
+++ b/src/Instantiator.cs
@@ -868,7 +868,7 @@ namespace Crow
il.Emit (OpCodes.Call, typeof(CompilerServices).GetMethod("getMemberInfoWithReflexion", BindingFlags.Static | BindingFlags.Public));
il.Emit (OpCodes.Stloc_1);//save memberInfo
il.Emit (OpCodes.Ldloc_1);//push mi for test if null
- il.Emit (OpCodes.Brfalse, cancel);
+ il.Emit (OpCodes.Brfalse, cancelInit);//propertyLessBinding
}
il.Emit (OpCodes.Ldarg_1);//load source of dataSourceChanged which is the dest instance