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 committed Mar 28, 2024
1 parent 99bfacc commit bc0c2e9
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 bc0c2e9

Please sign in to comment.