fix a bug

--HG--
branch : develop
This commit is contained in:
vorzelmir 2019-07-09 16:19:48 +03:00
parent 1b7dd14f54
commit a58da6c323
2 changed files with 5 additions and 6 deletions

View File

@ -267,12 +267,8 @@ void VWidgetGroups::FillTable(const QMap<quint32, QPair<QString, bool> > &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());

View File

@ -33,6 +33,9 @@
#include <QTableWidgetItem>
#include "../ifc/xml/vabstractpattern.h"
class QTableWidgetItem;
void SetIconValue(quint32, bool visible, QTableWidgetItem *item);
namespace Ui
{
class VWidgetGroups;