[mapguide-commits] r7400 - trunk/Tools/Maestro/Maestro.Base/Editor

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Mon Mar 18 03:46:15 PDT 2013


Author: jng
Date: 2013-03-18 03:46:14 -0700 (Mon, 18 Mar 2013)
New Revision: 7400

Modified:
   trunk/Tools/Maestro/Maestro.Base/Editor/XmlEditorDialog.cs
Log:
#2226: Assign a default font when XML editor is loaded from a dialog (as is the case with "Edit as XML" command). This was the cause of NullReferenceException on Copy or ctrl+C

Modified: trunk/Tools/Maestro/Maestro.Base/Editor/XmlEditorDialog.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/Editor/XmlEditorDialog.cs	2013-03-18 02:41:16 UTC (rev 7399)
+++ trunk/Tools/Maestro/Maestro.Base/Editor/XmlEditorDialog.cs	2013-03-18 10:46:14 UTC (rev 7400)
@@ -59,6 +59,8 @@
         public XmlEditorDialog(IEditorService edsvc)
             : this()
         {
+            //NRE happens if we copy without setting a font first
+            _ed.TextFont = new System.Drawing.Font("Courier New", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
             _edSvc = edsvc;
             _edSvc.RegisterCustomNotifier(this);
             this.Disposed += new EventHandler(OnDisposed);



More information about the mapguide-commits mailing list