fix #317368: fix Score.staves property

Port of 2ba915f6bb to MU4.

Adds Staff type registration that was missed in 4ea5007.
Changes \since statement for Score.staves property because the property
appears to be broken in earlier versions. The other relevant property
(Element.staff) works fine in the previous versions, therefore no changes for it.
This commit is contained in:
Dmitri Ovodok 2021-02-13 20:39:15 +03:00
parent 98ac59bdc5
commit 558aafb72e
2 changed files with 2 additions and 1 deletions

View file

@ -317,6 +317,7 @@ void PluginAPI::registerQmlTypes()
qmlRegisterAnonymousType<Segment>("MuseScore", 3);
qmlRegisterAnonymousType<Measure>("MuseScore", 3);
qmlRegisterAnonymousType<Part>("MuseScore", 3);
qmlRegisterAnonymousType<Staff>("MuseScore", 3);
qmlRegisterAnonymousType<Instrument>("MuseScore", 3);
qmlRegisterAnonymousType<Channel>("MuseScore", 3);
qmlRegisterAnonymousType<StringData>("MuseScore", 3);

View file

@ -112,7 +112,7 @@ class Score : public Ms::PluginAPI::ScoreElement
/**
* List of staves in this score.
* \since MuseScore 3.5
* \since MuseScore 3.6.3
*/
Q_PROPERTY(QQmlListProperty<Ms::PluginAPI::Staff> staves READ staves)