feat(cpn): Identify new and changed models by italicising row (#3840)

* enh(cpn): identify new and changed models by italicising row

* enh(cpn): identify drag n drop and new from template as changed
This commit is contained in:
Neil Horne
2023-09-02 18:37:27 +10:00
committed by GitHub
parent e832ef6521
commit 71b0614503
4 changed files with 35 additions and 6 deletions
+5 -2
View File
@@ -171,9 +171,12 @@ QVariant ModelsListModel::data(const QModelIndex & index, int role) const
return item->data(index.column());
}
if (role == Qt::FontRole && item->isModel() && item->getModelIndex() == (int)radioData->generalSettings.currModelIndex) {
if (role == Qt::FontRole && item->isModel()) {
QFont font;
font.setBold(true);
if (item->getModelIndex() == (int)radioData->generalSettings.currModelIndex)
font.setBold(true);
if (radioData->models[item->getModelIndex()].modelUpdated)
font.setItalic(true);
return font;
}