Skip to content
Permalink
Browse files
hide setting and value control in setSortOrder
  • Loading branch information
luipir committed May 10, 2017
1 parent c092eff commit a924915
Showing 1 changed file with 2 additions and 7 deletions.
@@ -197,13 +197,8 @@ void QgsAttributeTableConfig::readXml( const QDomNode &node )
}

mSortExpression = configNode.toElement().attribute( QStringLiteral( "sortExpression" ) );
mSortOrder = static_cast<Qt::SortOrder>( configNode.toElement().attribute( QStringLiteral( "sortOrder" ) ).toInt() );
// fix https://hub.qgis.org/issues/15803
// because static_cast give umpredictable value if value is not in the enum range
if ( mSortOrder != Qt::AscendingOrder && mSortOrder != Qt::DescendingOrder )
{
mSortOrder = Qt::AscendingOrder;
}
Qt::SortOrder sortOrder = static_cast<Qt::SortOrder>( configNode.toElement().attribute( QStringLiteral( "sortOrder" ) ).toInt() );
setSortOrder( sortOrder );
}

QString QgsAttributeTableConfig::sortExpression() const

0 comments on commit a924915

Please sign in to comment.