fix bug in not "activating" items
This commit is contained in:
parent
13b0b0348a
commit
c46a01ea3d
2 changed files with 7 additions and 5 deletions
|
@ -1,4 +1,5 @@
|
|||
#include "serviceitem.h"
|
||||
#include <QDebug>
|
||||
|
||||
ServiceItem::ServiceItem(QObject *parent)
|
||||
: QObject{parent}
|
||||
|
@ -166,11 +167,13 @@ void ServiceItem::setFontSize(int fontSize)
|
|||
|
||||
void ServiceItem::setActive(bool active)
|
||||
{
|
||||
if (m_active == active)
|
||||
return;
|
||||
qDebug() << "::::::::::::::::::::";
|
||||
qDebug() << "CHANGE ME!";
|
||||
if (m_active == active)
|
||||
return;
|
||||
|
||||
m_active = active;
|
||||
emit activeChanged(m_active);
|
||||
m_active = active;
|
||||
emit activeChanged(m_active);
|
||||
}
|
||||
|
||||
void ServiceItem::setSelected(bool selected)
|
||||
|
|
|
@ -470,7 +470,6 @@ bool ServiceItemModel::activate(int id) {
|
|||
qDebug() << "################";
|
||||
emit dataChanged(idx, idx, QVector<int>() << ActiveRole);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
item->setActive(true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue