InvalidCastException when repository set to project (#467)

To reproduce:

  • Create new project
  • Create new class diagram
  • Create new class in diagram
  • Go into properties of class
  • Click ellipsis (...) next to Repository
  • Choose the project (the root)

When the project is chosen as the repository, an error dialog appears with the following message:

System.InvalidCastException: Unable to cast object of type 'System.String' to type 'SoftwareIdeasModeler.Core.Projecting.IProjectItem'.

at SoftwareIdeasModeler.Dialogs.Pickers.RepositoryPickerForm.repositoryTree_AfterSelect(Object sender, NodeEventArgs e)

at SoftwareIdeasModeler.Controls.FastTree.FastTree.OnAfterSelect(NodeEventArgs e)

at SoftwareIdeasModeler.Controls.FastTree.FastTree.treePanel_MouseDown(Object sender, MouseEventArgs e)

at System.Windows.Forms.Control.OnMouseDown(MouseEventArgs e)

at System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks)

at System.Windows.Forms.Control.WndProc(Message& m)

at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

OF=SoftwareIdeasModeler.MainForm

LastCmd=SoftwareIdeasModeler.Core.Commands.CombinedCreateCommand

OF=DockablePanel.Controls.DockablePanel.FloatingForm

OF=SoftwareIdeasModeler.Forms.StartForm

OF=SoftwareIdeasModeler.Forms.ProjectForm

OF=SoftwareIdeasModeler.Forms.EditorForm

OF=SoftwareIdeasModeler.Dialogs.Properties.ItemPropertiesForm

OF=SoftwareIdeasModeler.Dialogs.Pickers.RepositoryPickerForm

Created
19 March 2016 22:21:02
Closed
21 March 2016 22:41:24
Requested by
Chris Simmons
State
Solved
Version
9.31.5904.36746 (64-bit)
OperatingSystem
Windows 8.1
Solved in
9.32

Chris Simmons 21 March 2016 22:48:26

I can verify this is fixed. Thank you again, Dusan.

TrackedRequestComment
Your Name:
You can use these formatting tags: [b]bold[/b] [i]italic[/i] [u]underline[/u] [url]www.example.com[/url] [code]some code[/code] [quote]quoted text[/quote] [list]one list item per line[/list]