From a58da6c323c7d79a756e8cfdbeeaf3f677c58fb0 Mon Sep 17 00:00:00 2001 From: vorzelmir Date: Tue, 9 Jul 2019 16:19:48 +0300 Subject: [PATCH] fix a bug --HG-- branch : develop --- src/app/valentina/dialogs/vwidgetgroups.cpp | 8 ++------ src/app/valentina/dialogs/vwidgetgroups.h | 3 +++ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/app/valentina/dialogs/vwidgetgroups.cpp b/src/app/valentina/dialogs/vwidgetgroups.cpp index ba1eb7546..725807a35 100644 --- a/src/app/valentina/dialogs/vwidgetgroups.cpp +++ b/src/app/valentina/dialogs/vwidgetgroups.cpp @@ -267,12 +267,8 @@ void VWidgetGroups::FillTable(const QMap > &groups QTableWidgetItem *item = new QTableWidgetItem(); item->setTextAlignment(Qt::AlignHCenter); - quint32 id = item->data(Qt::UserRole).toUInt(); - if (data.second) - { - SetIconValue(id, true, item); - } - + (data.second) ? item->setIcon(QIcon("://icon/16x16/open_eye.png")) + : item->setIcon(QIcon("://icon/16x16/closed_eye.png")); item->setData(Qt::UserRole, i.key()); diff --git a/src/app/valentina/dialogs/vwidgetgroups.h b/src/app/valentina/dialogs/vwidgetgroups.h index 67560d9eb..4cf854799 100644 --- a/src/app/valentina/dialogs/vwidgetgroups.h +++ b/src/app/valentina/dialogs/vwidgetgroups.h @@ -33,6 +33,9 @@ #include #include "../ifc/xml/vabstractpattern.h" +class QTableWidgetItem; +void SetIconValue(quint32, bool visible, QTableWidgetItem *item); + namespace Ui { class VWidgetGroups;