Fix accessing the root folder for setting the library type

This commit is contained in:
luisangelsm
2025-12-14 10:17:32 +01:00
parent 3fb02c6fda
commit 8c7916eb0c
3 changed files with 47 additions and 18 deletions

View File

@ -608,8 +608,7 @@ void LibraryWindow::createMenus()
auto typeMenu = new QMenu(tr("Set type"), selectedLibrary);
connect(typeMenu, &QMenu::aboutToShow, this, [=]() {
auto rootIndex = foldersModel->index(0, 0);
auto folder = foldersModel->getFolder(rootIndex);
auto folder = foldersModel->getRootFolder();
setupActions(folder.type);
});