Return true iff the attribute is recognized.
| 820 | |
| 821 | // Return true iff the attribute is recognized. |
| 822 | bool Track::HandleCommonXMLAttribute( |
| 823 | const std::string_view& attr, const XMLAttributeValueView& valueView) |
| 824 | { |
| 825 | long nValue = -1; |
| 826 | |
| 827 | bool handled = false; |
| 828 | AttachedTrackObjects::ForEach([&](auto &attachment){ |
| 829 | handled = handled || attachment.HandleXMLAttribute( attr, valueView ); |
| 830 | }); |
| 831 | if (handled) |
| 832 | ; |
| 833 | // Note that the per-group properties of name and selectedness may have |
| 834 | // been written redundantly for each channel, and values for the last |
| 835 | // channel will be the last ones assigned |
| 836 | else if (attr == "name") { |
| 837 | SetName(valueView.ToWString()); |
| 838 | return true; |
| 839 | } |
| 840 | else if (attr == "isSelected" && valueView.TryGet(nValue)) { |
| 841 | this->SetSelected(nValue != 0); |
| 842 | return true; |
| 843 | } |
| 844 | return false; |
| 845 | } |
| 846 | |
| 847 | void Track::AdjustPositions() |
| 848 | { |
nothing calls this directly
no test coverage detected