[mapguide-commits] r9116 - trunk/Tools/Maestro/Maestro.Editors/Fusion/WidgetEditors

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Wed Jan 11 06:20:09 PST 2017


Author: jng
Date: 2017-01-11 06:20:09 -0800 (Wed, 11 Jan 2017)
New Revision: 9116

Modified:
   trunk/Tools/Maestro/Maestro.Editors/Fusion/WidgetEditors/GenericWidgetCtrl.cs
Log:
Trigger dirty state when editing widget XML

Fixes #2592

Modified: trunk/Tools/Maestro/Maestro.Editors/Fusion/WidgetEditors/GenericWidgetCtrl.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/Fusion/WidgetEditors/GenericWidgetCtrl.cs	2017-01-11 14:14:45 UTC (rev 9115)
+++ trunk/Tools/Maestro/Maestro.Editors/Fusion/WidgetEditors/GenericWidgetCtrl.cs	2017-01-11 14:20:09 UTC (rev 9116)
@@ -44,9 +44,11 @@
         private string _xml;
         private IWidget _widget;
         private IWidgetInfo _widgetInfo;
+        private IEditorService _edSvc;
 
-        public void Setup(IWidget widget, FlexibleLayoutEditorContext context, IEditorService edsvc)
+        public void Setup(IWidget widget, FlexibleLayoutEditorContext context, IEditorService edSvc)
         {
+            _edSvc = edSvc;
             _widget = widget;
             _xml = _widget.ToXml();
             _widgetInfo = context.GetWidgetInfo(widget.Type);
@@ -62,6 +64,10 @@
         private void txtXmlContent_TextChanged(object sender, EventArgs e)
         {
             btnSave.Enabled = !(txtXmlContent.Text.Equals(_xml));
+            if (btnSave.Enabled)
+            {
+                _edSvc.MarkDirty();
+            }
         }
 
         private void btnSave_Click(object sender, EventArgs e)



More information about the mapguide-commits mailing list