2022-03-25 Fred Gleason <fredg@paravelsystems.com>

* Reverted the following changes:
	2022-03-09 Fred Gleason <fredg@paravelsystems.com>
 	  * Fixed a regression in rdlogedit(1) that caused events from
	  previously viewed logs to be prepended to subsequent logs viewed
	  during the same session.
	2022-03-09 Fred Gleason <fredg@paravelsystems.com>
	  * Refactored the 'RDAddLog' dialog to allow for instance reuse.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason
2022-03-25 12:04:39 -04:00
parent 672bd74a7c
commit 2fbc9681b4
25 changed files with 132 additions and 128 deletions

View File

@@ -978,8 +978,9 @@ void EditLog::saveasData()
QString err_msg;
if(rda->user()->createLog()) {
log=new RDAddLog(RDLogFilter::UserFilter,"RDLogEdit",this);
if(log->exec(&logname,&svcname)<0) {
log=new RDAddLog(&logname,&svcname,RDLogFilter::UserFilter,
tr("Add Log"),this);
if(log->exec()<0) {
return;
}
if(!RDLog::create(logname,svcname,QDate(),rda->ripc()->user(),&err_msg,
@@ -1070,8 +1071,6 @@ void EditLog::okData()
void EditLog::cancelData()
{
bool ret=false;
if(edit_changed) {
switch(QMessageBox::question(this,
tr("RDLogEdit"),
@@ -1085,7 +1084,6 @@ void EditLog::cancelData()
return;
}
SaveLog();
ret=true;
break;
case QMessageBox::Cancel:
@@ -1100,7 +1098,7 @@ void EditLog::cancelData()
}
delete edit_log_lock;
edit_log_lock=NULL;
done(ret);
done(false);
}