Details,Colors, choose color name as display role

pull/19/head
Michail Vourlakos 5 years ago
parent a37d4df09c
commit ee9c69ad8b

@ -100,10 +100,10 @@ QVariant Colors::data(const QModelIndex &index, int role) const
return QVariant{}; return QVariant{};
} }
if (role == IDROLE) { if (role == NAMEROLE || role == Qt::DisplayRole) {
return m_colorsTable[row].id;
} else if (role == NAMEROLE) {
return m_colorsTable[row].name; return m_colorsTable[row].name;
} else if (role == IDROLE) {
return m_colorsTable[row].id;
} else if (role == PATHROLE) { } else if (role == PATHROLE) {
return m_colorsTable[row].path; return m_colorsTable[row].path;
} else if (role == TEXTCOLORROLE) { } else if (role == TEXTCOLORROLE) {

Loading…
Cancel
Save