Navigation Menu

Skip to content

Commit

Permalink
Fix #11146 (rule check state not saved)
Browse files Browse the repository at this point in the history
  • Loading branch information
wonder-sk committed Sep 7, 2014
1 parent bd3f593 commit 4291337
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core/symbology-ng/qgsrulebasedrendererv2.cpp
Expand Up @@ -281,6 +281,8 @@ QDomElement QgsRuleBasedRendererV2::Rule::save( QDomDocument& doc, QgsSymbolV2Ma
ruleElem.setAttribute( "label", mLabel );
if ( !mDescription.isEmpty() )
ruleElem.setAttribute( "description", mDescription );
if ( !mCheckState )
ruleElem.setAttribute( "checkstate", 0 );

for ( RuleList::iterator it = mChildren.begin(); it != mChildren.end(); ++it )
{
Expand Down Expand Up @@ -589,6 +591,8 @@ QgsRuleBasedRendererV2::Rule* QgsRuleBasedRendererV2::Rule::create( QDomElement&
int scaleMaxDenom = ruleElem.attribute( "scalemaxdenom", "0" ).toInt();
Rule* rule = new Rule( symbol, scaleMinDenom, scaleMaxDenom, filterExp, label, description );

rule->setCheckState( ruleElem.attribute( "checkstate", "1" ).toInt() );

QDomElement childRuleElem = ruleElem.firstChildElement( "rule" );
while ( !childRuleElem.isNull() )
{
Expand Down

1 comment on commit 4291337

@3nids
Copy link
Member

@3nids 3nids commented on 4291337 Sep 7, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks !

Please sign in to comment.