mirror of
https://github.com/YACReader/yacreader
synced 2025-11-14 14:02:45 -05:00
fixed adding reading lists
This commit is contained in:
@ -1593,11 +1593,12 @@ void LibraryWindow::addNewReadingList()
|
|||||||
|
|
||||||
if (ok) {
|
if (ok) {
|
||||||
QModelIndexList selectedLists = listsView->selectionModel()->selectedIndexes();
|
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
|
listsModel->addReadingList(newListName); //top level
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
listsModel->addReadingListAt(newListName,selectedLists.at(0));
|
listsModel->addReadingListAt(newListName,sourceMI);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user