diff --git a/src/app/qgsappbrowserproviders.cpp b/src/app/qgsappbrowserproviders.cpp index fd87034b985..a199a1ebf3e 100644 --- a/src/app/qgsappbrowserproviders.cpp +++ b/src/app/qgsappbrowserproviders.cpp @@ -645,7 +645,6 @@ QgsBookmarkManagerItem::QgsBookmarkManagerItem( QgsDataItem *parent, const QStri addChildItem( new QgsBookmarkGroupItem( this, newDetails.group(), mManager ), true ); } } - } ); connect( mManager, &QgsBookmarkManager::bookmarkChanged, this, [ = ]( const QString & id ) { @@ -676,6 +675,11 @@ QgsBookmarkManagerItem::QgsBookmarkManagerItem( QgsDataItem *parent, const QStri { newGroup->addBookmark( newDetails ); } + else + { + // need to create a new group for this (will automatically add the new bookmark) + addChildItem( new QgsBookmarkGroupItem( this, newDetails.group(), mManager ), true ); + } } break; } @@ -702,6 +706,11 @@ QgsBookmarkManagerItem::QgsBookmarkManagerItem( QgsDataItem *parent, const QStri { newGroup->addBookmark( newDetails ); } + else + { + // need to create a new group for this (will automatically add the new bookmark) + addChildItem( new QgsBookmarkGroupItem( this, newDetails.group(), mManager ), true ); + } } else {