2018-08-28 Fred Gleason <fredg@paravelsystems.com>

* Added an optional third argument to the 'Add Next' ['PX'] RML
	to allow specication of the transition type.
This commit is contained in:
Fred Gleason
2018-08-28 12:57:36 -04:00
parent 319928a6cf
commit c3adee3c07
4 changed files with 22 additions and 8 deletions

View File

@@ -42,6 +42,7 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
RDLogLine *logline=NULL;
QString label;
int mach=0;
RDLogLine::TransType trans=RDLogLine::Play;
if(rml->role()!=RDMacro::Cmd) {
return;
@@ -783,7 +784,7 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
break;
case RDMacro::PX: // Add Next
if(rml->argQuantity()!=2) {
if((rml->argQuantity()<2)||(rml->argQuantity()>3)) {
if(rml->echoRequested()) {
rml->acknowledge(false);
rda->ripc()->sendRml(rml);
@@ -798,15 +799,24 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
}
return;
}
trans=RDLogLine::Play;
if(rml->argQuantity()==3) {
if(rml->arg(2).toLower()=="segue") {
trans=RDLogLine::Segue;
}
if(rml->arg(2).toLower()=="stop") {
trans=RDLogLine::Stop;
}
}
if(air_log[rml->arg(0).toInt()-1]->nextLine()>=0) {
air_log[rml->arg(0).toInt()-1]->
insert(air_log[rml->arg(0).toInt()-1]->nextLine(),
rml->arg(1).toUInt(),RDLogLine::Play);
rml->arg(1).toUInt(),RDLogLine::NoTrans,trans);
}
else {
air_log[rml->arg(0).toInt()-1]->
insert(air_log[rml->arg(0).toInt()-1]->size(),
rml->arg(1).toUInt(),RDLogLine::Play);
rml->arg(1).toUInt(),RDLogLine::NoTrans,trans);
air_log[rml->arg(0).toInt()-1]->
makeNext(air_log[rml->arg(0).toInt()-1]->size()-1);
}