2020-04-08 Fred Gleason <fredg@paravelsystems.com>

* 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 <fredg@paraelsystems.com>
This commit is contained in:
Fred Gleason 2020-04-09 13:09:45 -04:00
parent 3229d8a87e
commit f92e8771ce
3 changed files with 16 additions and 9 deletions

View File

@ -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 <fredg@paravelsystems.com>
* Fixed a bug in the 'List GPIs' dialog in rdadmin(1) that
prevented changes in GPI assignments from being propagated
to the underlying device.

View File

@ -2,7 +2,7 @@
//
// Edit a Rivendell Gpi
//
// (C) Copyright 2002-2019 Fred Gleason <fredg@paravelsystems.com>
// (C) Copyright 2002-2020 Fred Gleason <fredg@paravelsystems.com>
//
// 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;

View File

@ -2,7 +2,7 @@
//
// List Rivendell GPIOs
//
// (C) Copyright 2002-2019 Fred Gleason <fredg@paravelsystems.com>
// (C) Copyright 2002-2020 Fred Gleason <fredg@paravelsystems.com>
//
// 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());