mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-09-17 17:00:27 +02:00
2016-07-26 Fred Gleason <fredg@paravelsystems.com>
* Added a sanity check in the 'RDCut::setMetadata()' method in 'lib/rdcut.cpp' to ensure that the cut 'Description' field is always populated.
This commit is contained in:
parent
9550815023
commit
a20b7f2437
@ -15416,3 +15416,7 @@
|
|||||||
'SERVICE_CLOCKS' table.
|
'SERVICE_CLOCKS' table.
|
||||||
* Modified 'rdlogmanager/list_clocks.cpp' to use the new
|
* Modified 'rdlogmanager/list_clocks.cpp' to use the new
|
||||||
'SERVICE_CLOCKS' table.
|
'SERVICE_CLOCKS' table.
|
||||||
|
2016-07-26 Fred Gleason <fredg@paravelsystems.com>
|
||||||
|
* Added a sanity check in the 'RDCut::setMetadata()' method in
|
||||||
|
'lib/rdcut.cpp' to ensure that the cut 'Description' field is always
|
||||||
|
populated.
|
||||||
|
@ -1135,6 +1135,24 @@ void RDCut::setMetadata(RDWaveData *data) const
|
|||||||
sprintf(" where CUT_NAME=\"%s\"",(const char *)cut_name.utf8());
|
sprintf(" where CUT_NAME=\"%s\"",(const char *)cut_name.utf8());
|
||||||
RDSqlQuery *q=new RDSqlQuery(sql);
|
RDSqlQuery *q=new RDSqlQuery(sql);
|
||||||
delete q;
|
delete q;
|
||||||
|
|
||||||
|
//
|
||||||
|
// Sanity Check: NEVER permit the 'description' field to be empty.
|
||||||
|
//
|
||||||
|
sql=QString("select DESCRIPTION from CUTS where ")+
|
||||||
|
"CUT_NAME=\""+RDEscapeString(cut_name)+"\"";
|
||||||
|
q=new RDSqlQuery(sql);
|
||||||
|
if(q->first()) {
|
||||||
|
if(q->value(0).toString().isEmpty()) {
|
||||||
|
sql=QString("update CUTS set ")+
|
||||||
|
QString().sprintf("DESCRIPTION=\"Cut %03d\"",
|
||||||
|
RDCut::cutNumber(cut_name))+
|
||||||
|
" where CUT_NAME=\""+RDEscapeString(cut_name)+"\"";
|
||||||
|
delete q;
|
||||||
|
q=new RDSqlQuery(sql);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
delete q;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user