From ee9c69ad8b858382e81093340b5c878b226ca2fb Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Tue, 28 Jul 2020 18:51:24 +0300 Subject: [PATCH] Details,Colors, choose color name as display role --- app/settings/models/colorsmodel.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/settings/models/colorsmodel.cpp b/app/settings/models/colorsmodel.cpp index a85454eae..cf532ebc8 100644 --- a/app/settings/models/colorsmodel.cpp +++ b/app/settings/models/colorsmodel.cpp @@ -100,10 +100,10 @@ QVariant Colors::data(const QModelIndex &index, int role) const return QVariant{}; } - if (role == IDROLE) { - return m_colorsTable[row].id; - } else if (role == NAMEROLE) { + if (role == NAMEROLE || role == Qt::DisplayRole) { return m_colorsTable[row].name; + } else if (role == IDROLE) { + return m_colorsTable[row].id; } else if (role == PATHROLE) { return m_colorsTable[row].path; } else if (role == TEXTCOLORROLE) {