2021-08-16 Fred Gleason <fredg@paravelsystems.com>

* Fixed a bug in rdadmin(1) that caused a newly created schedule
	code to persist even if its creation was abandoned halfway through
	the creation process.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason 2021-08-16 11:14:43 -04:00
parent d51c4c2e4c
commit 5ec0d7681a
2 changed files with 9 additions and 6 deletions

View File

@ -22284,3 +22284,7 @@
2021-08-15 Fred Gleason <fredg@paravelsystems.com> 2021-08-15 Fred Gleason <fredg@paravelsystems.com>
* Fixed a regression in rdadmin(1) that threw a SQL error when * Fixed a regression in rdadmin(1) that threw a SQL error when
attempting to create a new Replicator entry. attempting to create a new Replicator entry.
2021-08-16 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in rdadmin(1) that caused a newly created schedule
code to persist even if its creation was abandoned halfway through
the creation process.

View File

@ -120,14 +120,13 @@ void ListSchedCodes::addData()
{ {
QString scode; QString scode;
if(list_add_schedcode_dialog->exec(&scode)) { if(list_add_schedcode_dialog->exec(&scode)&&
if(list_edit_schedcode_dialog->exec(scode)) { list_edit_schedcode_dialog->exec(scode)) {
QModelIndex index=list_schedcodes_model->addSchedCode(scode); QModelIndex index=list_schedcodes_model->addSchedCode(scode);
if(index.isValid()) { if(index.isValid()) {
list_schedcodes_view->selectRow(index.row()); list_schedcodes_view->selectRow(index.row());
} }
} }
}
else { else {
QString sql=QString("delete from `SCHED_CODES` where ")+ QString sql=QString("delete from `SCHED_CODES` where ")+
"`CODE`='"+RDEscapeString(scode)+"'"; "`CODE`='"+RDEscapeString(scode)+"'";