[mapguide-commits] r6050 - in trunk/Tools/Maestro/Maestro.Base: Commands UI

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Tue Aug 9 09:09:02 EDT 2011


Author: jng
Date: 2011-08-09 06:09:02 -0700 (Tue, 09 Aug 2011)
New Revision: 6050

Modified:
   trunk/Tools/Maestro/Maestro.Base/Commands/NewItemCommand.cs
   trunk/Tools/Maestro/Maestro.Base/UI/NewResourceDialog.cs
Log:
#1775: In a perfect world, every major Linux distribution would be on the latest Mono release, where this bug doesn't occur. Sadly Ubuntu is still using 2.6, so we have to hack a workaround. This submission is that workaround.


Modified: trunk/Tools/Maestro/Maestro.Base/Commands/NewItemCommand.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/Commands/NewItemCommand.cs	2011-08-09 11:02:53 UTC (rev 6049)
+++ trunk/Tools/Maestro/Maestro.Base/Commands/NewItemCommand.cs	2011-08-09 13:09:02 UTC (rev 6050)
@@ -53,13 +53,11 @@
             if (dlg.ShowDialog(wb) == System.Windows.Forms.DialogResult.OK)
             {
                 var tpl = dlg.SelectedTemplate;
-                
                 var res = tpl.CreateItem(startPoint, conn);
                 if (res != null)
                 {
                     res.ResourceID = "Session:" + conn.SessionID + "//" + Guid.NewGuid().ToString() + "." + res.ResourceType.ToString();
                     conn.ResourceService.SaveResource(res);
-
                     var ed = orm.Open(res.ResourceID, conn, false, exp);
                     if (!string.IsNullOrEmpty(startPoint))
                     {

Modified: trunk/Tools/Maestro/Maestro.Base/UI/NewResourceDialog.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/UI/NewResourceDialog.cs	2011-08-09 11:02:53 UTC (rev 6049)
+++ trunk/Tools/Maestro/Maestro.Base/UI/NewResourceDialog.cs	2011-08-09 13:09:02 UTC (rev 6050)
@@ -193,6 +193,7 @@
                 var tpl = (ItemTemplate)li.Tag;
 
                 txtDescription.Text = tpl.Description;
+                this.SelectedTemplate = tpl;
                 CheckButtonState();
             }
         }
@@ -223,14 +224,8 @@
         /// </summary>
         public ItemTemplate SelectedTemplate
         {
-            get
-            {
-                if (lstTemplates.SelectedItems.Count == 1)
-                {
-                    return (ItemTemplate)lstTemplates.SelectedItems[0].Tag;
-                }
-                return null;
-            }
+            get;
+            private set;
         }
 
         private void RememberSelectedCategories()



More information about the mapguide-commits mailing list