@@ -21,7 +21,7 @@ import "selectionhelper.js" as SelHelper
2121/* 1.2.0 : Bug: The pattern summary was always written on the first staff.
2222/* 1.2.0 : CR: Allow ascii symbols for alterations in the pattern summaries (noteHelper 2.0.3)
2323/* 1.2.0 : CR: Option to stop the pattern when pattern summary is encountered
24-
24+ /* 1.2.0 : Compatibility mode with MU4.5
2525
2626Issues :
2727* matching of accidentals in the UseAsRest: a E# is matched with a F, a Gb is matched with a F#
@@ -30,15 +30,17 @@ Issues :
3030/**********************************************/
3131MuseScore {
3232 menuPath: " Plugins." + qsTr (" Euclidean Rhythm" )
33- version: " 1.1 .0"
33+ version: " 1.2 .0"
3434 requiresScore: true
3535 description: qsTr (" Create an euclidean rhythm" )
3636 pluginType: " dialog"
3737
3838 id: mainWindow
39+ // 4.4 title: "Euclidean Rhythm"
40+ // 4.4 thumbnailName: "logo.png"
3941
4042 Component .onCompleted : {
41- if (mscoreMajorVersion >= 4 ) {
43+ if (mscoreMajorVersion >= 4 && mscoreMajorVersion <= 3 ) {
4244 mainWindow .title = qsTr (" Euclidean Rhythm" );
4345 mainWindow .thumbnailName = " logo.png" ;
4446 // mainWindow.categoryCode = "batch-processing";
@@ -510,7 +512,7 @@ MuseScore {
510512 RowLayout {
511513 Layout .column : 1
512514 Layout .row : 3
513- ComboBox {
515+ CompatibleComboBox {
514516 model: durationmult
515517 id: mult
516518 textRole: " text"
@@ -566,7 +568,7 @@ MuseScore {
566568 ImageButton {
567569 id: loadPattern
568570 // enabled: (typeof positionInScore !== undefined) && (typeof positionInScore.summary !== undefined)
569- enabled: (typeof positionInScore !== undefined )? (typeof positionInScore .summary === " object" ): false
571+ enabled: (( typeof positionInScore !== " undefined" ) && (positionInScore !== null ) )? (typeof positionInScore .summary === " object" ): false
570572 imageHeight: 25
571573 imageSource: " upload.svg"
572574 ToolTip .text : qsTr (" Load from log" )
@@ -653,7 +655,7 @@ MuseScore {
653655 ButtonGroup .group : source
654656 }
655657
656- ComboBox {
658+ CompatibleComboBox {
657659 id: adhocNote
658660 model: allnotes
659661 textRole: " name"
@@ -758,7 +760,7 @@ MuseScore {
758760 ButtonGroup .group : off
759761 }
760762
761- ComboBox {
763+ CompatibleComboBox {
762764 model: allnotes
763765 textRole: " name"
764766 id: offbeatNote
@@ -810,15 +812,22 @@ MuseScore {
810812 alignment: Qt .AlignRight
811813 background .opacity : 0 // hide default white background
812814
813- standardButtons: DialogButtonBox .Cancel
815+ // standardButtons: DialogButtonBox.Cancel
816+
814817
815- Button {
818+ CompatibleButton {
816819 id: ok
817820 enabled: (patternBeats .text !== " " ) && (patternSize .text !== " " )
818821 text: qsTr (" Create" )
819822 DialogButtonBox .buttonRole : DialogButtonBox .AcceptRole
820823 }
821824
825+ CompatibleButton {
826+ id: cancel
827+ text: qsTr (" Cancel" )
828+ DialogButtonBox .buttonRole : DialogButtonBox .RejectRole
829+ }
830+
822831 onAccepted: {
823832 work ();
824833 }
0 commit comments