mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -04:00
fixed adding reading lists
This commit is contained in:
parent
5ec03916fb
commit
d2d3f9ddeb
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user