Пример #1
0
void ScoreDef::Replace( StaffDef *newStaffDef )
{
    // first find the staffDef with the same @n
    StaffDef *staffDef = this->GetStaffDef( newStaffDef->GetStaffNo() );
    
    // if found, replace attributes
    if (staffDef) {
        staffDef->ReplaceClef( newStaffDef->GetClefAttr() );
        staffDef->ReplaceKeySig( newStaffDef->GetKeySigAttr() );
        staffDef->ReplaceMensur( newStaffDef->GetMensurAttr() );
    }
}
Пример #2
0
void ScoreDef::Replace( StaffDef *newStaffDef )
{
    // first find the staffDef with the same @n
    StaffDef *staffDef = this->GetStaffDef( newStaffDef->GetN() );
    
    // if found, replace attributes
    if (staffDef) {
        staffDef->ReplaceClef( newStaffDef->GetClef() );
        staffDef->ReplaceKeySig( newStaffDef->GetKeySig() );
        staffDef->ReplaceMensur( newStaffDef->GetMensur() );
        staffDef->ReplaceMeterSig( newStaffDef->GetMeterSig() );
        // copy other attributes if present
        if ( newStaffDef->HasLabel() ) staffDef->SetLabel( newStaffDef->GetLabel() );
        if ( newStaffDef->HasLabelAbbr() ) staffDef->SetLabelAbbr( newStaffDef->GetLabelAbbr() );
    }
}