@@ -99,20 +99,20 @@ MuseScore {
99
99
harp .tuning = harp .get (currentIndex).tuning
100
100
}
101
101
}
102
- // ComboBox {
103
- // currentIndex: 1
104
- // model: ListModel {
105
- // id: placetext
106
- // property var position
107
- // ListElement { text: "Above staff"; position: "above" }
108
- // ListElement { text: "Below staff"; position: "below" }
109
- // }
110
- // width: 100
111
- // onCurrentIndexChanged: {
112
- // console.debug(placetext.get(currentIndex).text + ", " + placetext.get(currentIndex).position)
113
- // placetext.position = placetext.get(currentIndex).position
114
- // }
115
- // }
102
+ ComboBox {
103
+ currentIndex: 1
104
+ model: ListModel {
105
+ id: placetext
106
+ property var position
107
+ ListElement { text: " Above staff" ; position: " above" }
108
+ ListElement { text: " Below staff" ; position: " below" }
109
+ }
110
+ width: 100
111
+ onCurrentIndexChanged: {
112
+ console .debug (placetext .get (currentIndex).text + " , " + placetext .get (currentIndex).position )
113
+ placetext .position = placetext .get (currentIndex).position
114
+ }
115
+ }
116
116
}
117
117
RowLayout {
118
118
anchors .horizontalCenter : parent .horizontalCenter
@@ -252,9 +252,8 @@ MuseScore {
252
252
var endStaff;
253
253
var endTick;
254
254
var fullScore = false ;
255
- // TODO : deal with placement
256
- // var textposition = placetext.position
257
- // console.log("textposition set to " + placetext.position)
255
+
256
+ var textposition = (placetext .position === " above" ? Placement .ABOVE : Placement .BELOW );
258
257
259
258
cursor .rewind (1 );
260
259
if (! cursor .segment ) { // no selection
@@ -296,13 +295,16 @@ MuseScore {
296
295
var notes = graceChords[i].notes ;
297
296
tabNotes (notes, text);
298
297
// TODO: deal with placement of grace note on the x axis
298
+ text .placement = textposition
299
+ text .offset = Qt .point (- 40 , 0 )
299
300
cursor .add (text);
300
301
// new text for next element
301
302
text = newElement (Element .STAFF_TEXT );
302
303
}
303
304
304
305
var notes = cursor .element .notes ;
305
306
tabNotes (notes, text);
307
+ text .placement = textposition
306
308
307
309
cursor .add (text);
308
310
} // end if CHORD
0 commit comments