Commit graph

1832 commits

Author SHA1 Message Date
Dmitri Ovodok
b8eba0fa81 fix #296566: erase invalid elements from CmdState
Prevents crashes if an element triggering layout has been deleted,
e.g. in case of an unsuccessful attempt to add a glissando to a score.
2019-11-11 09:27:42 +02:00
anatoly-os
e924baaa92
Merge pull request #5394 from dmitrio95/283943-delete-measure-end-glissando-crash
fix #283943: fix a crash on deleting a measure at glissando end
2019-10-29 11:16:50 +02:00
Leon Vinken
b096b42605 fix #295348 - [Musicxml Export] - Strange Missing Hairpins 2019-10-27 10:59:21 +01:00
Dmitri Ovodok
99c7b0d746 Add more information to setLayout() 2019-10-25 16:18:41 +02:00
Marc Sabatella
e7e17a7cf8 fix test scripts to not rely on note input starting on first measure 2019-10-24 16:44:52 -06:00
Marc Sabatella
8f7580eb70 fix #296053: improve algorithm for determing start point for note input
Resolves: https://musescore.org/en/node/296053

The algorithm for finding a start point for note input works well in most cases,
in particular, if a measure or a note or reset is selected.
The cases were nothing is selected, or an element other than a note or rest is selected,
are sometimes good, sometimes we give up too easily
and select the first (or first visible) measure.

This change improves the no selection case by using the last-selected CR if it is in view
(using the recently-added code for remembering the last selected position).
It improves the case of soemthing other than a note or rest select
by using the actual tick of the element
rather than trying to guess a tick by looking for a parent measure.
That works for elements that are ultimately parented by a measure,
but fails for things like spanners, which are children of the system.
It turns out that SpannerSegment had no tick() function, so this failed at first,
but I added an override, which may well fix some other bug somewhere.

Another side benefit of the change is that if select an element not at the start of the measure
(for examplea mid-measure staff text), input starts at that tick,
not at the beginning of the measure.
2019-10-24 12:11:55 -06:00
heuchi
832864d80c fix #295957 Pedal continueText not saved 2019-10-23 08:12:19 +02:00
Dmitri Ovodok
1e522744c1 fix #283943: fix a crash on deleting a measure at glissando end
Remove glissandi crossing the deleted measure range like it is done
currently for ties.
2019-10-16 14:12:49 +02:00
Marc Sabatella
30e1ea9674 fix #295357: lyrics Y offset in parts lost on save/reload
In 3.0 - 3.0.5, it was not possible to change the Y position of lyrics.
You could try, and an offset would be recorded, but it would have no effect on layout.
Starting with 3.1, it became possible to change the Y position for lyrics.
For compatibility, we cleared the Y offset when reading  3.0 - 3.0.5 scores,
since it would have been ignored originally.
However, the code doing the version check fails in parts,
because mscoreVersion() returns an empty stirng in that case.
This change simply amends the check to use masterScore() rather than score(),
so parts no longer return an empty version,
and also adds an explicit check for the version being empty,
so the check works correctly in test mode,
where this field is often empty even for the master score.
2019-10-07 14:33:11 -06:00
anatoly-os
4d4f6f5663
Merge pull request #5327 from MarcSabatella/294126-navigate-measure-elements
fix #294126: cannot navigate to measure elements
2019-10-02 15:29:18 +02:00
Dmitri Ovodok
5b80191bd5
Merge pull request #5336 from peterhieuvu/tuplet-saving
fix #293429: tuplet property saving
2019-10-02 10:41:12 +02:00
Marc Sabatella
68a3791c47 fix #295107: hang or crash on fingering mode after last note
There turned out to be several aspects to this.
In 3.2.3, we could get a hang if there was literally only one note,
as the navigation would loop back around and we didn't always catch it.
For 3.3 I eliminated the looping back around on navigation,
but neglected to add a check for start/end of score in "fingering mode".
This adds that check (in ScoreView::textTab(), the test for el2 == el).
But further testing revealed further checks we need to make to be safe.
The checks that the current element is actually a child of the note
in Note::nextInEl() and Note::prevInEl() prevents a crash
if one navigates before the fingering has been added to its parent
or after it has been removed (which happens with empty fingering elements).
For consistency with how chord symbols work, and to circumvent other future problems,
I elected to have Space *exit* "fingering mode" after reaching the end of the score.
This required making a reasonable selection (the "exit cleanly" code in textTab)
but also calling mscore->endCmd() and returning immediately in events.cpp in that case.
This had the side benefit of allowing me to remove the updateInspector() call
in textTab(), as it is covered by the endCmd() call.
I should note there are other code paths in, for example, the harmony tab functions,
that can leave an empty / deleted element still selected
when hitting space upon reaching the last note of a score.
But I could cause an actual problem to occur and chose to not deal with that here.

Script test added to cover the basic issue here.
2019-10-01 11:42:46 -06:00
anatoly-os
ebfd3ea346
Merge pull request #5330 from Howard-C/local-timesig
fix #294580: generate courtesy signature if next system has a local time signature on any staff
2019-10-01 10:29:15 +02:00
anatoly-os
511bdc3fa7
Merge pull request #5328 from MarcSabatella/294485-navigate-wrap
fix #294485: don't wrap to begin/end on next/previous element
2019-09-30 23:17:27 +02:00
anatoly-os
d159acd5a6
Merge pull request #5343 from MarcSabatella/294727-next-element-crash-voice-4
fix #294727: crash in fingering mode with notes in voice 4 on last staff
2019-09-30 23:06:41 +02:00
anatoly-os
cd8648ab74
Merge pull request #5344 from MarcSabatella/294728-min-distance-save
fix #294728: min distance not saved for lines unless offset changed too
2019-09-30 23:06:00 +02:00
Marc Sabatella
2d844d6c7d fix #293318: crash on paste of note onto grace note
Paste of a note onto a grace note has never worked;
the operation has always been silently rejected.
Now, however, it crashes, because we are attempting to select the note
we think we just pasted.
But there was no reason to reject the operation;
the same code that handles pasting onto a normal note
also works when pasting onto a grace note.
So this change removes the unnecessary check for grace notes.
By removing these four lines of code, it fixes the crash,
and allow the operation to actually succeed where it never did before.
2019-09-25 13:41:48 -06:00
Marc Sabatella
b995287630 fix #294728: min distance not saved for lines unless offset changed too
If you move a line into the skyline (e.g, overlapping other elements),
we reduce the min distance automatically and save the result correctly.
But if you reduce the min distance manually via the Inspector
but don't change the offset, then save, the min distance is not written.
That is because we check if the line has been modified before writing these properties.
But we were only checking offset and offset2, not min distance.
This change adds that check.
2019-09-24 08:32:19 -06:00
Marc Sabatella
954485d04e fix #294727: crash in fingering mode with notes in voice 4 on last staff
This was reported original as a crash in fingering entry,
but the underlying problem is in navigation,
When we have run out of notes in the current segment on the current staff,
we should move on to the next segment,
but Segment:nextElementOfSegment() was erroneously finding a note or rest
in voice 4 of the last system.
That is because the loop through the tracks was not handling the end condition properly.
We find an element but don't check that it is on the right staff.
This change simply adds the missing check.
2019-09-23 14:57:39 -06:00
Peter Hieu Vu
f3e2d4c76d fix #293429: tuplet property saving 2019-09-22 23:55:08 -07:00
Howard-C
4bd390e7a1 fix #294580: generate courtesy signature if next system has a local time signature on any staff
Resolves: https://musescore.org/node/294580.

Right now a courtesy time signature only generates if the local time signature is on the first staff, because the code only checks for the first track. The fix checks for all tracks.
2019-09-20 10:50:58 +08:00
Dmitri Ovodok
4646ce633d fix #280830: fix a crash on replacing a timesig with palette while in edit mode
Moved the fix from 7f9f1df8eb to a more
appropriate place so QML palettes can also benefit from it.
Added a test which reproduces this crash without the fix.
2019-09-19 12:50:46 +02:00
Marc Sabatella
c2726ead54 add script test for https://musescore.org/en/node/294485 2019-09-17 15:09:47 -06:00
Marc Sabatella
94d989429e fix #294126: cannot navigate to measure elements
The navigation code for next-element and previous-elements ignores measure elements
(elements in the el() list for the measure).
This change adds handling for this
by checking for measure elements before moving to the next or previous measure
in Segment::nextElement() and Segment::previousElement(),
There is corresponding code in Measure::nextElementStaff()
and in Measure::previousElementStaff()
to iterate through multiple elements if present.
2019-09-17 12:55:46 -06:00
Marc Sabatella
ef9a050f2d add script test + collect_artifacts 2019-09-17 13:33:48 +02:00
anatoly-os
60f463f7fb
Merge pull request #5293 from jthistle/293707-undo-no-restore-deleted-frame
fix #293707: undo doesn't restore deleted frame immediately
2019-09-04 20:20:43 +02:00
James Thistlewood
3f40a56dd9 fix #293707: undo doesn't restore deleted frame immediately
Why do these changes fix this particular issue?

After adding any other element, we `setLayout` at the element's
location. However, for boxes, there is an early return, and this step is
missed, meaning the box won't appear until a relevant measure is layed out.
This fix adds the missing `setLayout`.
2019-09-04 17:50:37 +01:00
Joachim Schmitz
89c95d7faa fix #294006: Symphony Orchestra template has wrong patches for pizzicato
and instruments.xml has it wrong too (and that in turn requires an mtest
change)
2019-09-03 09:18:57 +02:00
Dmitri Ovodok
c176981477 Use correct import paths for QML engine for palettes 2019-08-31 19:22:19 +03:00
anatoly-os
ad1852ca0a
Merge pull request #5242 from mattmcclinch/291038-fixup-midi
fix #282165: Mute voice produces note that doesn't stop when overlap present
2019-08-29 11:29:04 +02:00
Dale Larson
b60fea52cf Fix #293008: Plugin: Provide Note.tieBack & Note.tieForward properties in QML.
Provide Note.tieBack & Note.tieForward properties and their
associated Tie objects in QML. Also provides Note.firstTiedNote
and lastTiedNote methods to locate a tie range.
2019-08-27 17:28:53 -05:00
anatoly-os
b6d30457a9
Merge pull request #4950 from lvinken/tuplet-calc-fractions-004
fix #279828 - MusicXML import - attempting to fix badly read triplets…
2019-08-26 09:38:59 +02:00
Matt McClinch
711b7ab72c fix #282165: Mute voice produces note that doesn't stop when overlap present 2019-08-24 01:27:07 -04:00
anatoly-os
4601a0e12e
Merge pull request #5227 from lvinken/281592-musicxml-trill-export
281592 musicxml trill export
2019-08-17 11:32:21 +02:00
Leon Vinken
3a865b87f9 fix #281591 - Mid-measure barlines are not exported to musicxml 2019-08-14 07:40:06 +02:00
Leon Vinken
5d2f1d524f fix #281592 - Trills not exported properly to musicxml 2019-08-14 07:37:49 +02:00
Joachim Schmitz
7443719d87 fix #165621: Tremolo between 2 notes is copied even if unticked in selection filter
also change labels to a) plural and b) reflect better what they really
filter on
2019-07-30 13:38:48 +02:00
Dale Larson
b05c823912 Fix #291708: Expose PlayEvent's via QML Plugin Note interface.
Adds capablity to examine and modify PlayEvent's and a Note's
playEvents list. Adds access to Chord.playEventType. Also
supports UNDO for these operations.
2019-07-29 13:27:29 -05:00
Dale Larson
216188f7ed Fix #291708: Expose Score.selection object to access to GUI selected elements.
This commit exposes the Score.selection.elements list
enabling QML scripts to manipulate on user selected score elements.
The expectation is that additional selection information will be
provided on this object in the future.
2019-07-27 08:56:55 -05:00
Joachim Schmitz
cbe94e0054 fix mtest 2019-06-24 13:44:59 +02:00
anatoly-os
80d962a54b
Merge pull request #5114 from Jojo-Schmitz/templates
fix #290462, fix #290429: Changes to string sections
2019-06-24 12:57:55 +02:00
Dmitri Ovodok
b02afe9835 Setup tests for tempo issues (#289922, #290997, #281909) 2019-06-20 14:58:15 +02:00
Dmitri Ovodok
e8670cc7eb
Merge pull request #5077 from lvinken/280607-musicxml-top-text-export
fix #280607 - Musicxml export - top texts don't export
2019-06-17 10:55:41 +02:00
Dmitri Ovodok
89db48d291
Merge pull request #5119 from dmitrio95/articulation-placement-style
Add style settings for articulations placement
2019-06-15 13:55:40 +02:00
Dmitri Ovodok
1e49b31d00
Merge pull request #5094 from jthistle/290121-patch-changes-not-saved
fix #290121: changes to non-expr patches aren't saved
2019-06-15 11:44:37 +02:00
Dmitri Ovodok
e1aeb95b68
Merge pull request #4884 from MarcSabatella/286616-mmrest-header-trailer
fix #286616, fix #287432: handling of header/trailer on mmrests
2019-06-15 10:15:28 +02:00
Joachim Schmitz
f757d56c8b fix #290429: Update ensemble strings instruments to select correct presets 2019-06-14 10:56:16 +02:00
Dmitri Ovodok
e67b12cf0f Add style settings for articulations placement 2019-06-10 17:54:06 +02:00
anatoly-os
51a99ee195 Add more palette tests
The added tests involve:
 - barlines
 - lines
 - arpeggio and glissandi
 - tremolo
2019-06-07 14:22:39 +02:00
James Thistlewood
f3d04434f1 fix #290121: changes to non-expr patches aren't saved
fix #290147 as well
2019-06-04 18:42:55 +01:00