[mapguide-commits] r7714 - trunk/MgDev/Common/MapGuideCommon/MapLayer
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Fri Aug 2 00:44:54 PDT 2013
Author: jng
Date: 2013-08-02 00:44:53 -0700 (Fri, 02 Aug 2013)
New Revision: 7714
Modified:
trunk/MgDev/Common/MapGuideCommon/MapLayer/Map.cpp
Log:
#833: And here's the fix to make the test pass
Modified: trunk/MgDev/Common/MapGuideCommon/MapLayer/Map.cpp
===================================================================
--- trunk/MgDev/Common/MapGuideCommon/MapLayer/Map.cpp 2013-08-02 07:32:30 UTC (rev 7713)
+++ trunk/MgDev/Common/MapGuideCommon/MapLayer/Map.cpp 2013-08-02 07:44:53 UTC (rev 7714)
@@ -187,7 +187,6 @@
map<STRING, MgLayerGroup*>::const_iterator itKg;
- bool showInLegend;
MapLayerGroupCollection* groups = mdef->GetLayerGroups();
if(groups)
{
@@ -200,12 +199,9 @@
Ptr<MgLayerGroup> rtGroup = new MgLayerGroup(groupName);
rtGroup->SetVisible(group->IsVisible());
rtGroup->SetLayerGroupType(MgLayerGroupType::Normal);
- rtGroup->SetDisplayInLegend(showInLegend = group->IsShowInLegend());
- if(showInLegend)
- {
- rtGroup->SetExpandInLegend(group->IsExpandInLegend());
- rtGroup->SetLegendLabel(group->GetLegendLabel());
- }
+ rtGroup->SetDisplayInLegend(group->IsShowInLegend());
+ rtGroup->SetExpandInLegend(group->IsExpandInLegend());
+ rtGroup->SetLegendLabel(group->GetLegendLabel());
knownGroups[groupName] = rtGroup;
@@ -309,11 +305,8 @@
rtLayer->SetVisible(layer->IsVisible());
rtLayer->SetLayerType(MgLayerType::Dynamic);
rtLayer->SetDisplayInLegend(layer->IsShowInLegend());
- if(layer->IsShowInLegend())
- {
- rtLayer->SetExpandInLegend(layer->IsExpandInLegend());
- rtLayer->SetLegendLabel(layer->GetLegendLabel());
- }
+ rtLayer->SetExpandInLegend(layer->IsExpandInLegend());
+ rtLayer->SetLegendLabel(layer->GetLegendLabel());
rtLayer->SetSelectable(layer->IsSelectable());
rtLayer->SetDisplayOrder(displayOrder);
@@ -348,12 +341,9 @@
Ptr<MgLayerGroup> rtGroup = new MgLayerGroup(groupName);
rtGroup->SetVisible(baseGroup->IsVisible());
rtGroup->SetLayerGroupType(MgLayerGroupType::BaseMap);
- rtGroup->SetDisplayInLegend(showInLegend = baseGroup->IsShowInLegend());
- if(showInLegend)
- {
- rtGroup->SetExpandInLegend(baseGroup->IsExpandInLegend());
- rtGroup->SetLegendLabel(baseGroup->GetLegendLabel());
- }
+ rtGroup->SetDisplayInLegend(baseGroup->IsShowInLegend());
+ rtGroup->SetExpandInLegend(baseGroup->IsExpandInLegend());
+ rtGroup->SetLegendLabel(baseGroup->GetLegendLabel());
// NOTE: base groups do not have a parent group
@@ -379,11 +369,8 @@
rtLayer->SetVisible(true);
rtLayer->SetLayerType(MgLayerType::BaseMap);
rtLayer->SetDisplayInLegend(baseLayer->IsShowInLegend());
- if(baseLayer->IsShowInLegend())
- {
- rtLayer->SetExpandInLegend(baseLayer->IsExpandInLegend());
- rtLayer->SetLegendLabel(baseLayer->GetLegendLabel());
- }
+ rtLayer->SetExpandInLegend(baseLayer->IsExpandInLegend());
+ rtLayer->SetLegendLabel(baseLayer->GetLegendLabel());
rtLayer->SetSelectable(baseLayer->IsSelectable());
rtLayer->SetDisplayOrder(displayOrder);
More information about the mapguide-commits
mailing list