[mapguide-commits] r7266 - sandbox/adsk/2.4j/Common/Stylization
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Thu Dec 13 19:57:08 PST 2012
Author: waltweltonlair
Date: 2012-12-13 19:57:08 -0800 (Thu, 13 Dec 2012)
New Revision: 7266
Modified:
sandbox/adsk/2.4j/Common/Stylization/DefaultStylizer.cpp
Log:
Merge trunk changeset 7255 into adsk/2.4j branch stream.
This is for ticket #2200 (Stylization: GetRulesFilter does not return match for default rule).
Modified: sandbox/adsk/2.4j/Common/Stylization/DefaultStylizer.cpp
===================================================================
--- sandbox/adsk/2.4j/Common/Stylization/DefaultStylizer.cpp 2012-12-13 11:57:05 UTC (rev 7265)
+++ sandbox/adsk/2.4j/Common/Stylization/DefaultStylizer.cpp 2012-12-14 03:57:08 UTC (rev 7266)
@@ -589,12 +589,16 @@
RuleCollection* rulecoll = style->GetRules();
int nRules = rulecoll->GetCount();
- for (int j=0; j<nRules; ++j)
+ for (int j = nRules-1; j >= 0; --j)
{
CompositeRule* r = static_cast<CompositeRule*>(rulecoll->GetAt(j));
const MdfString& temp = r->GetFilter();
- if (!temp.empty())
+ // If any of the rules is the default rule, return an empty filter because the
+ // default rule will match all features, even those not matched by other rules.
+ if (temp.empty())
+ return NULL;
+ else
{
if (filterstr.empty())
filterstr.append(L"("); // start filter
More information about the mapguide-commits
mailing list