File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -197,13 +197,8 @@ void QgsAttributeTableConfig::readXml( const QDomNode &node )
197
197
}
198
198
199
199
mSortExpression = configNode.toElement ().attribute ( QStringLiteral ( " sortExpression" ) );
200
- mSortOrder = static_cast <Qt::SortOrder>( configNode.toElement ().attribute ( QStringLiteral ( " sortOrder" ) ).toInt () );
201
- // fix https://hub.qgis.org/issues/15803
202
- // because static_cast give umpredictable value if value is not in the enum range
203
- if ( mSortOrder != Qt::AscendingOrder && mSortOrder != Qt::DescendingOrder )
204
- {
205
- mSortOrder = Qt::AscendingOrder;
206
- }
200
+ Qt::SortOrder sortOrder = static_cast <Qt::SortOrder>( configNode.toElement ().attribute ( QStringLiteral ( " sortOrder" ) ).toInt () );
201
+ setSortOrder ( sortOrder );
207
202
}
208
203
209
204
QString QgsAttributeTableConfig::sortExpression () const
You can’t perform that action at this time.
0 commit comments