[mapguide-commits] r4423 - trunk/Tools/Maestro/Maestro

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Sat Dec 12 05:32:22 EST 2009


Author: ksgeograf
Date: 2009-12-12 05:32:22 -0500 (Sat, 12 Dec 2009)
New Revision: 4423

Modified:
   trunk/Tools/Maestro/Maestro/FormMain.cs
Log:
Maestro:
Fixed issue #1160.

Modified: trunk/Tools/Maestro/Maestro/FormMain.cs
===================================================================
--- trunk/Tools/Maestro/Maestro/FormMain.cs	2009-12-12 10:17:19 UTC (rev 4422)
+++ trunk/Tools/Maestro/Maestro/FormMain.cs	2009-12-12 10:32:22 UTC (rev 4423)
@@ -1377,10 +1377,13 @@
                         return;
 
 				//We do not enumerate here, because it is SLOW
-				if (ResourceTree.SelectedNode.Nodes.Count == 0 && MessageBox.Show(this, Strings.FormMain.DeleteFolderConfirmation, Application.ProductName, MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question) != DialogResult.Yes)
-					return;
-				else if (MessageBox.Show(this, Strings.FormMain.DeleteFolderAndResourcesConfirmation, Application.ProductName, MessageBoxButtons.YesNoCancel, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button3) != DialogResult.Yes)
-					return;
+                if (ResourceTree.SelectedNode.Nodes.Count == 0)
+                {
+                    if (MessageBox.Show(this, Strings.FormMain.DeleteFolderConfirmation, Application.ProductName, MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question) != DialogResult.Yes)
+                        return;
+                }
+                else if (MessageBox.Show(this, Strings.FormMain.DeleteFolderAndResourcesConfirmation, Application.ProductName, MessageBoxButtons.YesNoCancel, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button3) != DialogResult.Yes)
+                    return;
 
 				try
 				{
@@ -1567,6 +1570,21 @@
                         foreach (string s in toClose)
                             if (!m_userControls[s].Close(true))
                                 return false;
+
+                        //Empty folders do not require updating
+                        TreeNode item = FindItem(targetpath, true);
+
+                        if (item != null && item.Nodes.Count == 1)
+                            ResourceTree.Cache.BuildNode(item, false);
+
+                        if (item != null && item.Nodes.Count == 0)
+                        {
+                            m_connection.MoveFolder(sourcepath, targetpath, false);
+
+                            if (refreshTree)
+                                RebuildDocumentTree();
+                            return true;
+                        }
                     }
                     else
                         if (m_userControls.ContainsKey(sourcepath))



More information about the mapguide-commits mailing list