void StaffListItem::staffTypeChanged(int idx) { // check current clef matches new staff type int staffTypeIdx = _staffTypeCombo->itemData(idx).toInt(); const StaffType* stfType = StaffType::preset(StaffTypes(staffTypeIdx)); PartListItem* pli = static_cast<PartListItem*>(QTreeWidgetItem::parent()); pli->updateClefs(); if (_staff && _staff->staffType()->name() != stfType->name()) { if (_op != ListItemOp::I_DELETE && _op != ListItemOp::ADD) _op = ListItemOp::UPDATE; } }
void StaffListItem::staffTypeChanged(int idx) { // check current clef matches new staff type const int typeIdx = staffTypeIdx(idx); if (typeIdx == CUSTOM_STAFF_TYPE_IDX) // consider it not changed return; const StaffType* stfType = StaffType::preset(StaffTypes(typeIdx)); PartListItem* pli = static_cast<PartListItem*>(QTreeWidgetItem::parent()); pli->updateClefs(); if (_staff && _staff->staffType(0)->name() != stfType->name()) { if (_op != ListItemOp::I_DELETE && _op != ListItemOp::ADD) _op = ListItemOp::UPDATE; } }