Skip to content

Commit

Permalink
Fix clear after moving an event dashboard tile up/down
Browse files Browse the repository at this point in the history
  • Loading branch information
basyskom-jvoe authored and khaexy committed Apr 2, 2024
1 parent ca9b494 commit fd992aa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/monitoreditemmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,13 @@ void MonitoredItemModel::addEventItem(QOpcUaNode *node,
const int pos = mItems.size() - 1;
MonitoredItem *monitoredItem = new MonitoredItem(node, eventFilter);
connect(monitoredItem, &MonitoredItem::displayNameChanged, this, [=]() {
const auto pos = mItems.indexOf(monitoredItem);
emit dataChanged(index(pos), index(pos), QList<int>() << DisplayNameRole);
emit updated();
});

connect(monitoredItem, &MonitoredItem::lastEventsChanged, this, [=]() {
const auto pos = mItems.indexOf(monitoredItem);
emit dataChanged(index(pos), index(pos), QList<int>() << LastEventsRole);
emit updated();
});
Expand Down

0 comments on commit fd992aa

Please sign in to comment.