ghostx2 / superputty

Automatically exported from code.google.com/p/superputty
MIT License
0 stars 0 forks source link

Hosts moved to root (under Putty Sessions tree) are forever stuck there. #214

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. move a host out of a folder into Putty Sessions (root) folder.
2. Allow to save, close SP, reopen SP
3. Attempting to move the icon into a subfolder will always be temporary until 
closing and reopening SP. Sessions.XML always shows SessionId as empty no 
matter where the icon is moved around.

What is the expected output? What do you see instead?
After moving out of root, icon should save to XML it's new SessionId Path but 
isnt and is empty/null

What version of the product are you using? On what operating system?
Latest SVN.

Please provide any additional information below.

Original issue reported on code.google.com by djtrem...@gmail.com on 27 Aug 2012 at 9:16

GoogleCodeExporter commented 9 years ago
Addition info.

Hosts moved ANYWHERE are saved with no sessionID and hence fall stuck in root 
too. It seems to lose it in the treeView1_DragDrop() when being cloned it has 
no parent path but is updated before being added to the tree.

Patch below works for me.

Index: SessionTreeview.cs
===================================================================
--- SessionTreeview.cs  (revision 263)
+++ SessionTreeview.cs  (working copy)
@@ -767,9 +767,9 @@
                 nodePayload.Remove();

                 // add new
+                node.Nodes.Add(nodeNew);
                 UpdateSessionId(nodeNew, (SessionData)nodeNew.Tag); //
-                node.Nodes.Add(nodeNew);
-
+                
                 // If this a folder, reset it's childrens sessionIds
                 if (IsFolderNode(nodeNew))
                 {

Original comment by djtrem...@gmail.com on 29 Aug 2012 at 10:25

GoogleCodeExporter commented 9 years ago

Thanks, made the change.

Confirmed this was the way it was before v1.3.0.4

Original comment by btatey...@gmail.com on 1 Sep 2012 at 12:36