[mapguide-commits] r8197 - in trunk/Tools/Maestro: Maestro.Base/Commands/SiteExplorer Maestro.Base/UI OSGeo.MapGuide.MaestroAPI/Resource
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Tue Jun 10 09:02:56 PDT 2014
Author: jng
Date: 2014-06-10 09:02:55 -0700 (Tue, 10 Jun 2014)
New Revision: 8197
Modified:
trunk/Tools/Maestro/Maestro.Base/Commands/SiteExplorer/RenameCommand.cs
trunk/Tools/Maestro/Maestro.Base/UI/RepositoryTreeModel.cs
trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Resource/ResourceIdentifier.cs
Log:
Fix error deleting a resource of unknown type from the Site eExplorer.
Modified: trunk/Tools/Maestro/Maestro.Base/Commands/SiteExplorer/RenameCommand.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/Commands/SiteExplorer/RenameCommand.cs 2014-06-10 14:27:28 UTC (rev 8196)
+++ trunk/Tools/Maestro/Maestro.Base/Commands/SiteExplorer/RenameCommand.cs 2014-06-10 16:02:55 UTC (rev 8197)
@@ -119,7 +119,7 @@
//Need to refresh the model because it still is called by the old name
- var folder = ResourceIdentifier.GetParentFolder(oldid, false);
+ var folder = ResourceIdentifier.GetParentFolder(oldid);
exp.RefreshModel(conn.DisplayName, folder);
}
}
Modified: trunk/Tools/Maestro/Maestro.Base/UI/RepositoryTreeModel.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/UI/RepositoryTreeModel.cs 2014-06-10 14:27:28 UTC (rev 8196)
+++ trunk/Tools/Maestro/Maestro.Base/UI/RepositoryTreeModel.cs 2014-06-10 16:02:55 UTC (rev 8197)
@@ -266,7 +266,7 @@
if (IsRoot)
return;
- string parentid = ResourceIdentifier.GetParentFolder(this.ResourceId, false);
+ string parentid = ResourceIdentifier.GetParentFolder(this.ResourceId);
this.ResourceId = parentid + this.NameQualified + ((IsFolder) ? "/" : string.Empty); //NOXLATE
NotifyNodesChanged();
}
Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Resource/ResourceIdentifier.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Resource/ResourceIdentifier.cs 2014-06-10 14:27:28 UTC (rev 8196)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Resource/ResourceIdentifier.cs 2014-06-10 16:02:55 UTC (rev 8197)
@@ -253,7 +253,7 @@
/// </summary>
public string ParentFolder
{
- get { return ResourceIdentifier.GetParentFolder(m_id); }
+ get { return ResourceIdentifier.GetParentFolder(m_id, true /* Because it was initialized with a ResourceTypes enum */); }
}
#region Static handlers
@@ -580,9 +580,19 @@
/// Gets the parent folder.
/// </summary>
/// <param name="identifier">The identifier.</param>
+ /// <returns></returns>
+ public static string GetParentFolder(string identifier)
+ {
+ return GetParentFolder(identifier, false);
+ }
+
+ /// <summary>
+ /// Gets the parent folder.
+ /// </summary>
+ /// <param name="identifier">The identifier.</param>
/// <param name="strict">If true, the type of the identifier must be one that is supported by Maestro</param>
/// <returns></returns>
- public static string GetParentFolder(string identifier, bool strict = true)
+ internal static string GetParentFolder(string identifier, bool strict)
{
if (!Validate(identifier, strict))
throw new Exception(Strings.ErrorInvalidResourceIdentifier);
More information about the mapguide-commits
mailing list