From f92e8771ce416915226aa19d3990147fc98a2d06 Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Thu, 9 Apr 2020 13:09:45 -0400 Subject: [PATCH] 2020-04-08 Fred Gleason * Fixed a bug in the 'List GPIs' dialog in rdadmin(1) that prevented changes in GPI assignments from being propagated to the underlying device. Signed-off-by: Fred Gleason --- ChangeLog | 4 ++++ rdadmin/edit_gpi.cpp | 4 +--- rdadmin/list_gpis.cpp | 17 +++++++++++------ 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 06b616c5..fbd050b0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -19778,3 +19778,7 @@ * Modified rdadmin(1) Edit Service dialog to display built-in traffic and music import template values. * Added "Copy To Custom" buttons to rdadmin(1) Edit Service dialog. +2020-04-08 Fred Gleason + * Fixed a bug in the 'List GPIs' dialog in rdadmin(1) that + prevented changes in GPI assignments from being propagated + to the underlying device. diff --git a/rdadmin/edit_gpi.cpp b/rdadmin/edit_gpi.cpp index a988a269..e7e4e847 100644 --- a/rdadmin/edit_gpi.cpp +++ b/rdadmin/edit_gpi.cpp @@ -2,7 +2,7 @@ // // Edit a Rivendell Gpi // -// (C) Copyright 2002-2019 Fred Gleason +// (C) Copyright 2002-2020 Fred Gleason // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as @@ -32,8 +32,6 @@ EditGpi::EditGpi(int gpi,int *oncart,QString *ondesc, int *offcart,QString *offdesc,QWidget *parent) : RDDialog(parent) { - setModal(true); - edit_gpi=gpi; edit_oncart=oncart; edit_offcart=offcart; diff --git a/rdadmin/list_gpis.cpp b/rdadmin/list_gpis.cpp index 4520d775..341275e1 100644 --- a/rdadmin/list_gpis.cpp +++ b/rdadmin/list_gpis.cpp @@ -2,7 +2,7 @@ // // List Rivendell GPIOs // -// (C) Copyright 2002-2019 Fred Gleason +// (C) Copyright 2002-2020 Fred Gleason // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as @@ -30,8 +30,6 @@ ListGpis::ListGpis(RDMatrix *matrix,RDMatrix::GpioType type,QWidget *parent) : RDDialog(parent) { - setModal(true); - QString sql; RDSqlQuery *q; Q3ListViewItem *l; @@ -289,6 +287,13 @@ void ListGpis::okData() rml.setEchoRequested(false); delete station; + // + // Placeholders for the actual values generated below + // + rml.addArg(0); + rml.addArg(0); + rml.addArg(0); + Q3ListViewItem *item=list_list_view->firstChild(); while(item!=NULL) { sql=QString("insert into ")+list_tablename+" set "+ @@ -299,9 +304,9 @@ void ListGpis::okData() QString().sprintf("OFF_MACRO_CART=%d",item->text(3).toInt()); q=new RDSqlQuery(sql); delete q; - rml.addArg(item->text(0).toInt()); - rml.addArg(true); - rml.addArg(item->text(1).toInt()); + rml.setArg(2,item->text(0).toInt()); + rml.setArg(3,true); + rml.setArg(4,item->text(1).toInt()); rda->ripc()->sendRml(&rml); rml.setArg(3,false); rml.setArg(4,item->text(3).toInt());