[mapguide-commits] r5736 - trunk/Tools/Maestro/Maestro.Base/Commands
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Wed May 4 06:49:33 EDT 2011
Author: jng
Date: 2011-05-04 03:49:33 -0700 (Wed, 04 May 2011)
New Revision: 5736
Modified:
trunk/Tools/Maestro/Maestro.Base/Commands/SaveResourceCommand.cs
Log:
Tweak the Save Resource command. Because it state is no longer bound to the "dirtiness" of the active editor, we need to check if the active editor is a new resource. If so, invoke the save as command (prompting the user for target location). Otherwise use normal behaviour.
Modified: trunk/Tools/Maestro/Maestro.Base/Commands/SaveResourceCommand.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/Commands/SaveResourceCommand.cs 2011-05-04 10:45:46 UTC (rev 5735)
+++ trunk/Tools/Maestro/Maestro.Base/Commands/SaveResourceCommand.cs 2011-05-04 10:49:33 UTC (rev 5736)
@@ -34,10 +34,17 @@
var ed = wb.ActiveDocumentView as IEditorViewContent;
if (ed != null)
{
- using (new WaitCursor(wb))
+ if (ed.IsNew)
{
- ed.EditorService.Save();
+ new SaveResourceAsCommand().Run();
}
+ else
+ {
+ using (new WaitCursor(wb))
+ {
+ ed.EditorService.Save();
+ }
+ }
}
}
}
More information about the mapguide-commits
mailing list