From 0c8acd502a1de182896be80fdf3550363b1960c3 Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Wed, 9 Mar 2022 12:54:11 -0500 Subject: [PATCH] 2022-03-09 Fred Gleason * Fixed a regression in rdlogedit(1) that caused events from previously viewed logs to be prepended to subsequent logs viewed during the same session. Signed-off-by: Fred Gleason --- ChangeLog | 4 ++++ lib/rdlogmodel.cpp | 10 +++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 22bf751f..3d4cc0da 100644 --- a/ChangeLog +++ b/ChangeLog @@ -22937,3 +22937,7 @@ 2022-03-08 Fred Gleason * Added a 'direct' namespace to the 'Apple iTunes' and 'Apple iTunes + Superfeed' RSS schemas. +2022-03-09 Fred Gleason + * Fixed a regression in rdlogedit(1) that caused events from + previously viewed logs to be prepended to subsequent logs viewed + during the same session. diff --git a/lib/rdlogmodel.cpp b/lib/rdlogmodel.cpp index f9689774..5a3f220e 100644 --- a/lib/rdlogmodel.cpp +++ b/lib/rdlogmodel.cpp @@ -247,9 +247,13 @@ QString RDLogModel::logName() const void RDLogModel::setLogName(QString logname) { - RDLog *log=new RDLog(logname); - d_log_name=log->name(); // So we normalize the case - delete log; + if(d_log_name.toLower()!=logname) { + clear(); + printf("RDLogModel::setLogName(%s)\n",logname.toUtf8().constData()); + RDLog *log=new RDLog(logname); + d_log_name=log->name(); // So we normalize the case + delete log; + } }