mirror of
https://github.com/YACReader/yacreader
synced 2025-05-25 18:00:46 -04:00
Fix crash when dropping comics in sublists
This commit is contained in:
parent
acd5caa9fe
commit
5d10a03044
@ -2,6 +2,11 @@
|
||||
|
||||
Version counting is based on semantic versioning (Major.Feature.Patch)
|
||||
|
||||
## WIP
|
||||
|
||||
### YACReaderLibrary
|
||||
* Fix crash when dropping comics in sublists
|
||||
|
||||
## 9.13
|
||||
|
||||
### YACReaderLibrary
|
||||
|
@ -218,8 +218,13 @@ bool ReadingListModel::canDropMimeData(const QMimeData *data, Qt::DropAction act
|
||||
QByteArray rawData = data->data(YACReader::YACReaderLibrarSubReadingListMimeDataFormat);
|
||||
QDataStream in(&rawData, QIODevice::ReadOnly);
|
||||
in >> sublistsRows; // deserialize the list of indentifiers
|
||||
|
||||
if (sublistsRows.isEmpty())
|
||||
return false;
|
||||
|
||||
if (parent.row() != sublistsRows.at(0).second)
|
||||
return false;
|
||||
|
||||
return data->formats().contains(YACReader::YACReaderLibrarSubReadingListMimeDataFormat);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user