Copy screen level element to Components folder causes a crash
KallDrexx opened this issue · comments
- Open a screen and select a screen level element
- Press Ctrl+C
- select the
Components
folder - Press Ctrl+V
----> Observe crash
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at Gum.Logic.CopyPasteLogic.<>c__DisplayClass15_2.<PasteInstanceSaves>b__4(InstanceSave item) in C:\Users\me\code\MeadowGum\Gum\Gum\Logic\CopyPasteLogic.cs:line 406
at System.Linq.Enumerable.First[TSource](IEnumerable`1 source, Func`2 predicate)
at Gum.Logic.CopyPasteLogic.PasteInstanceSaves(List`1 instancesToCopy, List`1 copiedStates, ElementSave targetElement, InstanceSave selectedInstance) in C:\Users\me\code\MeadowGum\Gum\Gum\Logic\CopyPasteLogic.cs:line 406
at Gum.Logic.CopyPasteLogic.PasteCopiedInstanceSaves(TopOrRecursive topOrRecursive) in C:\Users\me\code\MeadowGum\Gum\Gum\Logic\CopyPasteLogic.cs:line 251
at Gum.Logic.CopyPasteLogic.OnPaste(CopyType copyType, TopOrRecursive topOrRecursive) in C:\Users\me\code\MeadowGum\Gum\Gum\Logic\CopyPasteLogic.cs:line 236
at Gum.Managers.HotkeyManager.HandleCopyCutPaste(KeyEventArgs e) in C:\Users\me\code\MeadowGum\Gum\Gum\Managers\HotkeyManager.cs:line 109
at Gum.Managers.HotkeyManager.HandleKeyDownElementTreeView(KeyEventArgs e) in C:\Users\me\code\MeadowGum\Gum\Gum\Managers\HotkeyManager.cs:line 16
at Gum.Managers.ElementTreeViewManager.HandleKeyDown(KeyEventArgs e) in C:\Users\me\code\MeadowGum\Gum\Gum\Plugins\InternalPlugins\TreeView\ElementTreeViewManager.cs:line 1428
at Gum.Managers.ElementTreeViewManager.ObjectTreeView_KeyDown(Object sender, KeyEventArgs e) in C:\Users\me\code\MeadowGum\Gum\Gum\Plugins\InternalPlugins\TreeView\ElementTreeViewManager.cs:line 1458
at System.Windows.Forms.Control.OnKeyDown(KeyEventArgs e)
at System.Windows.Forms.TreeView.OnKeyDown(KeyEventArgs e)
at CommonFormsAndControls.MultiSelectTreeView.OnKeyDown(KeyEventArgs e) in C:\Users\me\code\MeadowGum\Gum\CommonFormsAndControls\MultiSelectTreeView.cs:line 586
at System.Windows.Forms.Control.ProcessKeyEventArgs(Message& m)
at System.Windows.Forms.Control.ProcessKeyMessage(Message& m)
at System.Windows.Forms.Control.WmKeyChar(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.TreeView.WndProc(Message& m)
at CommonFormsAndControls.MultiSelectTreeView.WndProc(Message& m) in C:\Users\me\code\MeadowGum\Gum\CommonFormsAndControls\MultiSelectTreeView.cs:line 684
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Fixed by 64837d0