QmlDesigner: Update expand state upon renaming

Upon renaming an asset folder, update the expand state so that the
renamed folder receives the correct expand state.

Task-number: QDS-6200
Change-Id: I9868cb3e342a8a8488ed0b5a62735bc8af468dfe
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Mahmoud Badri
2022-02-14 18:16:30 +02:00
parent d1fd23100a
commit 42f260747e

View File

@@ -144,6 +144,9 @@ bool AssetsLibraryModel::renameFolder(const QString &folderPath, const QString &
return true; return true;
dir.cdUp(); dir.cdUp();
saveExpandedState(loadExpandedState(folderPath), dir.absoluteFilePath(newName));
return dir.rename(oldName, newName); return dir.rename(oldName, newName);
} }