[mapguide-commits] r5643 - trunk/Tools/Maestro/Maestro.Base/Services
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Mon Mar 21 05:31:08 EDT 2011
Author: jng
Date: 2011-03-21 02:31:08 -0700 (Mon, 21 Mar 2011)
New Revision: 5643
Modified:
trunk/Tools/Maestro/Maestro.Base/Services/OpenResourceManager.cs
Log:
#1636: Re-slot open editor to its saved resource id when saving a new resource
Modified: trunk/Tools/Maestro/Maestro.Base/Services/OpenResourceManager.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/Services/OpenResourceManager.cs 2011-03-21 07:09:06 UTC (rev 5642)
+++ trunk/Tools/Maestro/Maestro.Base/Services/OpenResourceManager.cs 2011-03-21 09:31:08 UTC (rev 5643)
@@ -138,9 +138,21 @@
};
ed.ViewContentClosed += (sender, e) =>
{
- _openItems.Remove(resourceId);
- siteExp.FlagNode(resourceId, NodeFlagAction.None);
+ _openItems.Remove(ed.EditorService.ResourceID);
+ siteExp.FlagNode(ed.EditorService.ResourceID, NodeFlagAction.None);
};
+ ed.EditorService.Saved += (sender, e) =>
+ {
+ //If saved from new resource, the resource id would be session based
+ //So we need to update this to the new resource id has defined by the
+ //editor service
+ if (_openItems.ContainsKey(resourceId))
+ {
+ var ed2 = _openItems[resourceId];
+ _openItems.Remove(resourceId);
+ _openItems[ed.EditorService.ResourceID] = ed2;
+ }
+ };
ed.DirtyStateChanged += (sender, e) =>
{
siteExp.FlagNode(resourceId, ed.IsDirty ? NodeFlagAction.HighlightDirty : NodeFlagAction.HighlightOpen);
More information about the mapguide-commits
mailing list