2020-12-15 Fred Gleason <fredg@paravelsystems.com>

* Fixed a regression in rdlogedit(1)'s 'Edit Log' dialog that
	could delay updating cart status indications when changing the
	logs owning service.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason 2020-12-15 13:09:53 -05:00
parent 0b57b4b8de
commit 355cad9d23
4 changed files with 18 additions and 1 deletions

View File

@ -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 <fredg@paravelsystems.com>
* Fixed a regression in rdlogedit(1)'s 'Edit Log' dialog that
could delay updating cart status indications when changing the
logs owning service.

View File

@ -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);

View File

@ -91,6 +91,7 @@ class RDLogModel : public QAbstractTableModel
protected:
void emitDataChanged(int row);
void emitAllDataChanged();
virtual QColor backgroundColor(int line,RDLogLine *ll) const;
private:

View File

@ -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();
}
}