mirror of
https://github.com/YACReader/yacreader
synced 2025-05-28 03:10:27 -04:00
fixed adding reading lists
This commit is contained in:
parent
5ec03916fb
commit
d2d3f9ddeb
@ -1593,11 +1593,12 @@ void LibraryWindow::addNewReadingList()
|
||||
|
||||
if (ok) {
|
||||
QModelIndexList selectedLists = listsView->selectionModel()->selectedIndexes();
|
||||
if(selectedLists.isEmpty() || listsModel->isReadingList(selectedLists.at(0)))
|
||||
QModelIndex sourceMI = listsModelProxy->mapToSource(selectedLists.at(0));
|
||||
if(selectedLists.isEmpty() || !listsModel->isReadingList(sourceMI))
|
||||
listsModel->addReadingList(newListName); //top level
|
||||
else
|
||||
{
|
||||
listsModel->addReadingListAt(newListName,selectedLists.at(0));
|
||||
listsModel->addReadingListAt(newListName,sourceMI);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user