mirror of
https://github.com/YACReader/yacreader
synced 2025-07-23 07:24:58 -04:00
colorized empty label widget and fixed label info on insert
This commit is contained in:
@ -73,6 +73,12 @@ QVariant ReadingListModel::data(const QModelIndex &index, int role) const
|
||||
return QVariant(ReadingListModel::Separator);
|
||||
}
|
||||
|
||||
if (role == ReadingListModel::LabelColorRole && typeid(*item) == typeid(LabelItem) )
|
||||
{
|
||||
LabelItem * labelItem = static_cast<LabelItem*>(item);
|
||||
return QVariant(labelItem->colorid());
|
||||
}
|
||||
|
||||
if (role == ReadingListModel::IDRole)
|
||||
return item->getId();
|
||||
|
||||
|
Reference in New Issue
Block a user