diff --git a/ChangeLog b/ChangeLog index 563656e2..3541c92d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -20692,3 +20692,7 @@ * Added a 'RDLogLine::refreshCart()' method. * Refactored the 'Edit Log' dialog in rdlogedit(1) to use Qt's MVC API. +2020-12-15 Fred Gleason + * Fixed a regression in rdlogedit(1)'s 'Edit Log' dialog that + could delay updating cart status indications when changing the + logs owning service. diff --git a/lib/rdlogmodel.cpp b/lib/rdlogmodel.cpp index 8beccdb4..ea4111dd 100644 --- a/lib/rdlogmodel.cpp +++ b/lib/rdlogmodel.cpp @@ -1565,6 +1565,15 @@ void RDLogModel::emitDataChanged(int row) } +void RDLogModel::emitAllDataChanged() +{ + QModelIndex left=createIndex(0,0); + QModelIndex right=createIndex(lineCount(),columnCount()); + + emit dataChanged(left,right); +} + + QColor RDLogModel::backgroundColor(int line,RDLogLine *ll) const { return d_palette.color(QPalette::Base); diff --git a/lib/rdlogmodel.h b/lib/rdlogmodel.h index c7c2f736..15944dbf 100644 --- a/lib/rdlogmodel.h +++ b/lib/rdlogmodel.h @@ -91,6 +91,7 @@ class RDLogModel : public QAbstractTableModel protected: void emitDataChanged(int row); + void emitAllDataChanged(); virtual QColor backgroundColor(int line,RDLogLine *ll) const; private: diff --git a/rdlogedit/logmodel.cpp b/rdlogedit/logmodel.cpp index d799c4dd..af16a457 100644 --- a/rdlogedit/logmodel.cpp +++ b/rdlogedit/logmodel.cpp @@ -65,7 +65,10 @@ bool LogModel::allGroupsValid() const void LogModel::setServiceName(const QString &str) { - d_group_list->setServiceName(str); + if(d_group_list->serviceName()!=str) { + d_group_list->setServiceName(str); + emitAllDataChanged(); + } }