Skip to content

Commit

Permalink
Fix key/value order
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso committed Jun 7, 2024
1 parent 9c0cb0f commit d4cf6b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gui/editorwidgets/qgsvaluemapconfigdlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ void QgsValueMapConfigDlg::setConfig( const QVariantMap &config )
{
for ( int i = 0, row = 0; i < valueList.count(); i++, row++ )
{
orderedList.append( qMakePair( valueList[i].toMap().constBegin().key(), valueList[i].toMap().constBegin().value() ) );
orderedList.append( qMakePair( valueList[i].toMap().constBegin().value().toString(), valueList[i].toMap().constBegin().key() ) );
}
}
else
Expand All @@ -111,7 +111,7 @@ void QgsValueMapConfigDlg::setConfig( const QVariantMap &config )
if ( QgsVariantUtils::isNull( mit.value() ) )
orderedList.append( qMakePair( mit.key(), QVariant() ) );
else
orderedList.append( qMakePair( mit.key(), mit.value() ) );
orderedList.append( qMakePair( mit.value().toString(), mit.key() ) );
}
}

Expand Down

0 comments on commit d4cf6b0

Please sign in to comment.