2018-07-17 Fred Gleason <fredg@paravelsystems.com>

* Fixed a bug in rdadmin(1) that caused the Audio Resources list
	to be mal-formatted.
	* Fixed a bug in rdcatch(1) that caused Record and Playout events
	to be saved to the incorrect Location.
This commit is contained in:
Fred Gleason
2018-07-17 18:57:07 +00:00
parent 1ad82fc6a5
commit 291dfc4d06
6 changed files with 66 additions and 38 deletions

View File

@@ -410,11 +410,12 @@ void EditPlayout::PopulateDecks(QComboBox *box)
void EditPlayout::Save()
{
QStringList f0=f0.split(":",edit_station_box->currentText());
int chan=-1;
QString station=GetLocation(&chan);
edit_recording->setIsActive(edit_active_button->isChecked());
edit_recording->setStation(f0[0]);
edit_recording->setStation(station);
edit_recording->setType(RDRecording::Playout);
edit_recording->setChannel(f0[2].toInt()+128);
edit_recording->setChannel(chan+128);
if(edit_starttime_edit->time().isNull()) {
edit_recording->setStartTime(edit_starttime_edit->time().addMSecs(1));
}
@@ -432,3 +433,12 @@ void EditPlayout::Save()
edit_recording->setSun(edit_sun_button->isChecked());
edit_recording->setOneShot(edit_oneshot_box->isChecked());
}
QString EditPlayout::GetLocation(int *chan) const
{
QStringList f0=f0.split(":",edit_station_box->currentText());
*chan=
f0[1].stripWhiteSpace().left(f0[1].stripWhiteSpace().length()-1).toInt();
return f0[0].stripWhiteSpace();
}