Fix sort order of newly made bookmark groups

This commit is contained in:
Nyall Dawson 2019-09-05 17:58:25 +10:00
parent dc00e8576c
commit 92c50df669

View File

@ -756,10 +756,6 @@ QVector<QgsDataItem *> QgsBookmarkManagerItem::createChildren()
else
{
QgsBookmarkGroupItem *item = new QgsBookmarkGroupItem( this, group, mManager );
// we want directories shown before files
item->setSortKey( QStringLiteral( " %1" ).arg( group ) );
children << item;
}
}
@ -806,6 +802,9 @@ QgsBookmarkGroupItem::QgsBookmarkGroupItem( QgsDataItem *parent, const QString &
mCapabilities = Fast;
mManager = manager;
mIconName = QStringLiteral( "/mIconFolder.svg" );
setSortKey( QStringLiteral( " %1" ).arg( name ) );
populate();
}