[mapguide-commits] r7874 - in branches/2.4/MgDev/Desktop: MapViewer MgAppLayout

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Fri Sep 27 02:29:25 PDT 2013


Author: jng
Date: 2013-09-27 02:29:24 -0700 (Fri, 27 Sep 2013)
New Revision: 7874

Modified:
   branches/2.4/MgDev/Desktop/MapViewer/MgComponent.cs
   branches/2.4/MgDev/Desktop/MgAppLayout/Sheboygan.AppLayout
Log:
mg-desktop: Handle cases where we get preferred size/width of 0 for spawing component UI content in a new window. Instead, use the largest value between the preferred and actual sizes.

Modified: branches/2.4/MgDev/Desktop/MapViewer/MgComponent.cs
===================================================================
--- branches/2.4/MgDev/Desktop/MapViewer/MgComponent.cs	2013-09-27 09:11:41 UTC (rev 7873)
+++ branches/2.4/MgDev/Desktop/MapViewer/MgComponent.cs	2013-09-27 09:29:24 UTC (rev 7874)
@@ -390,8 +390,8 @@
                 _control = control;
                 Rectangle screenRectangle = _frm.RectangleToScreen(_frm.ClientRectangle);
                 int titleHeight = screenRectangle.Top - _frm.Top;
-                _frm.Width = _control.PreferredSize.Width;
-                _frm.Height = _control.PreferredSize.Height + titleHeight + 10; //HACK: height calculation is imperfect, so pad out
+                _frm.Width = Math.Max(_control.Size.Width, _control.PreferredSize.Width);
+                _frm.Height = Math.Max(_control.Size.Height, _control.PreferredSize.Height) + titleHeight + 10; //HACK: height calculation is imperfect, so pad out
                 _frm.Text = _control.Title;
                 _frm.Controls.Add(_control);
                 _control.Closer = this;

Modified: branches/2.4/MgDev/Desktop/MgAppLayout/Sheboygan.AppLayout
===================================================================
--- branches/2.4/MgDev/Desktop/MgAppLayout/Sheboygan.AppLayout	2013-09-27 09:11:41 UTC (rev 7873)
+++ branches/2.4/MgDev/Desktop/MgAppLayout/Sheboygan.AppLayout	2013-09-27 09:29:24 UTC (rev 7874)
@@ -375,6 +375,10 @@
           <Name>DefaultGeometryTypes</Name>
           <Value>7</Value>
         </NameValue>
+        <NameValue>
+          <Name>Target</Name>
+          <Value>enum:OSGeo.MapGuide.Viewer.MgViewerTarget:TaskPane</Value>
+        </NameValue>
       </Properties>
     </ComponentDefinition>
     <ComponentDefinition>



More information about the mapguide-commits mailing list