diff options
| author | jp <jp_bruyere@hotmail.com> | 2016-04-14 12:16:50 +0200 |
|---|---|---|
| committer | jp <jp_bruyere@hotmail.com> | 2016-04-14 12:16:50 +0200 |
| commit | 45fb721a432caec62068994ee9a56a4b843bcc03 (patch) | |
| tree | 397399ea92f8a5748856dd4189c782b30ae20d59 /src/Interface.cs | |
| parent | 7d8177d457e8cdf623888ae01f6496aa67b93548 (diff) | |
| parent | ef53a23fa66932931b7150b489750725d82f77aa (diff) | |
Merge remote-tracking branch 'origin/ottd'
Diffstat (limited to 'src/Interface.cs')
| -rw-r--r-- | src/Interface.cs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/Interface.cs b/src/Interface.cs index 4cb94e76..41199fcc 100644 --- a/src/Interface.cs +++ b/src/Interface.cs @@ -72,7 +72,7 @@ namespace Crow public Queue<LayoutingQueueItem> LayoutingQueue; public Queue<GraphicObject> GraphicUpdateQueue = new Queue<GraphicObject>(); - + public string Clipboard; public static void RegisterForGraphicUpdate(GraphicObject g) { lock (CurrentInterface.GraphicUpdateQueue) { @@ -153,6 +153,13 @@ namespace Crow } Type t = Type.GetType ("Crow." + root); + if (t == null) { + Assembly a = Assembly.GetEntryAssembly (); + foreach (Type expT in a.GetExportedTypes ()) { + if (expT.Name == root) + t = expT; + } + } stream.Seek (0, SeekOrigin.Begin); return t; @@ -224,6 +231,7 @@ namespace Crow lock (UpdateMutex) { GraphicObject tmp = Interface.Load (path, this); AddWidget (tmp); + return tmp; } } @@ -457,7 +465,6 @@ namespace Crow { g.Parent = this; GraphicObjects.Insert (0, g); - g.RegisterForLayouting (LayoutingType.Sizing); } public void DeleteWidget(GraphicObject g) |