[fusion-commits] r2970 - in sandbox/adsk/3.2o: layers/MapGuide widgets/Redline/classes
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Mon Mar 6 20:16:02 PST 2017
Author: liuar
Date: 2017-03-06 20:16:02 -0800 (Mon, 06 Mar 2017)
New Revision: 2970
Modified:
sandbox/adsk/3.2o/layers/MapGuide/MapGuide.js
sandbox/adsk/3.2o/widgets/Redline/classes/markupeditor.php
Log:
#656 Error when select redline object.
Not quite sure why the error happens, just add some checks to avoid error.
Modified: sandbox/adsk/3.2o/layers/MapGuide/MapGuide.js
===================================================================
--- sandbox/adsk/3.2o/layers/MapGuide/MapGuide.js 2017-03-03 03:04:49 UTC (rev 2969)
+++ sandbox/adsk/3.2o/layers/MapGuide/MapGuide.js 2017-03-07 04:16:02 UTC (rev 2970)
@@ -1453,10 +1453,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.2o/widgets/Redline/classes/markupeditor.php
===================================================================
--- sandbox/adsk/3.2o/widgets/Redline/classes/markupeditor.php 2017-03-03 03:04:49 UTC (rev 2969)
+++ sandbox/adsk/3.2o/widgets/Redline/classes/markupeditor.php 2017-03-07 04:16:02 UTC (rev 2970)
@@ -71,7 +71,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