[fusion-commits] r2979 - in sandbox/adsk/3.0m: layers/MapGuide widgets/Redline/classes

svn_fusion at osgeo.org svn_fusion at osgeo.org
Wed Apr 12 01:09:50 PDT 2017


Author: liuar
Date: 2017-04-12 01:09:50 -0700 (Wed, 12 Apr 2017)
New Revision: 2979

Modified:
   sandbox/adsk/3.0m/layers/MapGuide/MapGuide.js
   sandbox/adsk/3.0m/widgets/Redline/classes/markupeditor.php
Log:
Merged revision(s) 2970 from sandbox/adsk/3.2o to sandbox/adsk/3.0m:
#656 Error when select redline object.

Not quite sure why the error happens, just add some checks to avoid error.



Modified: sandbox/adsk/3.0m/layers/MapGuide/MapGuide.js
===================================================================
--- sandbox/adsk/3.0m/layers/MapGuide/MapGuide.js	2017-04-12 05:54:18 UTC (rev 2978)
+++ sandbox/adsk/3.0m/layers/MapGuide/MapGuide.js	2017-04-12 08:09:50 UTC (rev 2979)
@@ -1445,10 +1445,12 @@
                 resp.hasSelection = true;
                 var layerId = layer.getName();
                 var oLayer = this.getLayerById(layerId);
-                resp.layers.push(oLayer.layerName);
-                resp[oLayer.layerName] = {
-                    featureCount: nFeatures
-                };
+                if (oLayer) {
+                    resp.layers.push(oLayer.layerName);
+                    resp[oLayer.layerName] = {
+                        featureCount: nFeatures
+                    };
+                }
             }
         }
         if (this.previousAttributes) {

Modified: sandbox/adsk/3.0m/widgets/Redline/classes/markupeditor.php
===================================================================
--- sandbox/adsk/3.0m/widgets/Redline/classes/markupeditor.php	2017-04-12 05:54:18 UTC (rev 2978)
+++ sandbox/adsk/3.0m/widgets/Redline/classes/markupeditor.php	2017-04-12 08:09:50 UTC (rev 2979)
@@ -65,7 +65,11 @@
         $idName = $keyProp->GetName();
         while ($featureReader->ReadNext())
         {
-            $id = $featureReader->GetInt32($idName);
+            $propType = $featureReader->GetPropertyType($idName);
+            if ($propType == MgPropertyType::Int64)
+                $id = $featureReader->GetInt64($idName);
+            else
+                $id = $featureReader->GetInt32($idName);
             $text = $featureReader->IsNull('Text') ? '' : trim($featureReader->GetString('Text'));
             $features[$id] = $text;
         }



More information about the fusion-commits mailing list