Use the right data index for getting the rating

This commit is contained in:
Luis Ángel San Martín 2025-01-26 11:22:43 +01:00
parent 31971c2348
commit 89d16b620a
2 changed files with 2 additions and 1 deletions

View File

@ -8,6 +8,7 @@ Version counting is based on semantic versioning (Major.Feature.Patch)
### YACReaderLibrary
* Improve flexibility of the open comic in third party app setting so more complex commands can be used. e.g. `open -a "/Applications/My Reader.app" "{comic_file_path}"`.
* Fix setting the comic rating in the table view.
## 9.15.0

View File

@ -285,7 +285,7 @@ QWidget *YACReaderRatingDelegate::createEditor(QWidget *parent,
void YACReaderRatingDelegate::setEditorData(QWidget *editor,
const QModelIndex &index) const
{
int rating = ((ComicItem *)index.internalPointer())->data(11).toInt();
int rating = ((ComicItem *)index.internalPointer())->data(ComicModel::Rating).toInt();
StarRating starRating(rating);