Commit graph

8427 commits

Author SHA1 Message Date
Dmitri Ovodok
809f416459 Fix extending hairpin to multiple systems with Shift+arrow with middle grip selected 2020-03-19 12:10:44 +02:00
Igor Korsukov
482bd502c4 fixed crash on Measure write 2020-03-19 11:51:00 +02:00
joshwd36
3130bcd26d Change structure of warnings, key signatures, and clefs to remove pointers between them and instrument changes 2020-03-18 18:26:09 +02:00
joshwd36
944d7d9515 Maintain instrument change transpositions when changing key signature 2020-03-18 18:26:07 +02:00
joshwd36
c5b3e14712 Automatically delete clef and key changes when instrument change is deleted 2020-03-18 18:21:27 +02:00
Dmitri Ovodok
58f6f99c91 Automatically change instrument change text to new instrument name
Co-authored-by: Josh Wood <joshwd36@gmail.com>
2020-03-18 18:21:27 +02:00
Josh Wood
26b5977a8a Show a dialog on adding instrument change, add instrument change only once for range selection 2020-03-18 18:21:26 +02:00
Joachim Schmitz
891841fd89 follow up for fix #288495: prevent wrong debug message 2020-03-18 13:35:49 +01:00
Igor Korsukov
87919f58d2 added audiveris import 2020-03-18 11:23:46 +02:00
Dmitri Ovodok
37521f4af9
Merge pull request #5803 from Jojo-Schmitz/compiler-warnings
fix some MSVC compiler warnings
2020-03-17 11:45:38 +02:00
Dmitri Ovodok
72ef2a5722
Merge pull request #5822 from njvdberg/issue-297482-layout-shifts
Fix #297482 - Score layout shifts when saved with fingering on acciaccatura
2020-03-17 10:38:44 +02:00
Dmitri Ovodok
7012eb7254
Merge pull request #5500 from Howard-C/prefer-sharp-flat
fix #288495: allow user to select flats or sharps for enharmonic key signatures
2020-03-17 10:26:55 +02:00
Niek van den Berg
2498950a2c Fix #297482 - Score layout shifts when saved with fingering on acciaccatura
Solves the shift of the fingering on the grace note, and therefor the shift of the line above the fingering.

The root cause was StemSlash. Shapes for the StemSlash are created during the layout of the
beams of the grace notes and the layout of these beams is with the layout of the complete Chord
to which the grace notes belong. As a result, the shapes of StemSlash are added to the skyline
after the layout of the Fingering so the layout of the Fingering was based of the layout of the
Stem only.
After a re-layout the StemSlash is included in the skyline so the re-layout will move
the Fingering and, in this case, also the line.
The solution was a extra layout of the StemSlash in Score::layoutChords3() so it StemSlash is
included in the skyline in time.

Although this issue is vert similar as #302316 and fix #297501, the root cause is
different.
2020-03-16 12:08:24 +01:00
Dmitri Ovodok
42da9ca6d2
Merge pull request #5523 from MarcSabatella/298273-divider-spacer
fix #298273: divider not displayed in some cases
2020-03-12 15:25:47 +02:00
Joachim Schmitz
9e150b0c4f fix some MSVC compiler warnings 2020-03-12 14:15:32 +01:00
Dmitri Ovodok
c2b52e66d7
Merge pull request #5608 from Howard-C/flippable
Improve error message from flip command
2020-03-12 14:53:43 +02:00
Dmitri Ovodok
3ae776cb86
Merge pull request #5000 from Jojo-Schmitz/size_t
fix some compiler warnings differently/cleaner
2020-03-12 11:33:53 +02:00
Dmitri Ovodok
5804b001ab Revert "fix #279859 reallow drop break elements on vbox"
This reverts commit 1416aa8557.
Tests on MusicXML export are failing with this commit.
2020-03-12 10:34:16 +02:00
Dmitri Ovodok
6bbe3ed79a
Merge pull request #4468 from ericfont/279859-dont-set-linebreak-flag-vbox
fix #279859 reallow drop break elements on vbox
2020-03-12 09:48:55 +02:00
Dmitri Ovodok
10bf8b56ee Fix build after dd735c95c9 2020-03-11 15:26:49 +02:00
Dmitri Ovodok
dd735c95c9
Merge pull request #4147 from mattmcclinch/278080-empty-page
fix #278080: Request to show empty page rather than no page for score with no content
2020-03-11 15:03:01 +02:00
Dmitri Ovodok
ab4883cb2d
Merge pull request #5717 from Howard-C/straight
fix #301103: "Straight" text does not work
2020-03-11 09:11:56 +02:00
Howard-C
0f9c5e2d89 fix #301103: "Straight" text does not work
+ rename "SwingOff" to "swingOff" for consistency
2020-03-11 11:52:20 +08:00
Dmitri Ovodok
7569ebb7b4
Merge pull request #5704 from Jojo-Schmitz/multimap
copy `#include <QMultiMap>` to all.h
2020-03-10 15:19:37 +02:00
Dmitri Ovodok
dc8bd44011
Merge pull request #5743 from mattmcclinch/299768-paste-hairpin
fix #299768: Hairpin: when copied, all custom settings are lost and the element resets to default
2020-03-10 14:28:38 +02:00
Dmitri Ovodok
93b96c3c23
Merge pull request #5757 from Howard-C/arpeggio-glissandi
fix #301555: invisible arpeggios and glissandi occupy space
2020-03-10 14:02:23 +02:00
Dmitri Ovodok
85999e75cf
Merge pull request #5771 from flynndcs/301753-figuredbassrests
fix #301753: Figures under rests
2020-03-10 12:27:49 +02:00
Dmitri Ovodok
df11d4b8e3
Merge pull request #5786 from Kartikay26/290034-repeats-in-newly-opened-score
fix #290034: play repeats button not respected  in new score
2020-03-10 12:06:58 +02:00
Dmitri Ovodok
b03960e386
Merge pull request #5787 from MarcSabatella/300693-fb-cont
fix #300693: fb continuation not drawn when ending in voice 2
2020-03-10 11:58:11 +02:00
Dmitri Ovodok
72378dad3d
Merge pull request #5672 from dmitrio95/289643-volta-anchor-read
fix #289643: fix crashes if volta anchor is set incorrectly in MSCZ file
2020-03-10 10:39:57 +02:00
Dmitri Ovodok
f97cfd1f1a fix #289643: fix crashes if volta anchor is set incorrectly in MSCZ file 2020-03-10 10:39:33 +02:00
Dmitri Ovodok
78e0f092f1
Merge pull request #5671 from dmitrio95/autosave-performance
Improve autosave performance
2020-03-10 10:34:21 +02:00
Dmitri Ovodok
ba9ebc83aa Score comparison tool: avoid crash on inability to merge text diffs
Calling merge() on non-adjacent text diffs should probably not happen
and reveals a potential bug in score diff code, but it is not a fatal
error and should not lead to MuseScore crash. This commit avoids
terminating MuseScore in this case. Score comparison still produces
sensible results in case of such error.
2020-03-09 15:59:23 +02:00
Niek van den Berg
f30891cd74 Fix #121416 - Show instrument name on lower staff when upper staff of multi-staff instrument is empty and hidden
Root cause is a nice catch-22 in collectSystems().
First setInstrumentNames() is called to create InstrumentName elements. To do so correctly,
it needs information on which staves are hidden but this is information becomes available
much later, after it is know which measures are a system because now we know which staves
are empty and can be hidden.
The InstrumentName elements are required because this affects the available space for
measures.

The choosen solution is to move the InstrumentName elements from the top staff to the
first visible staff of the part. Since this is known in a very late stage, checks of
whether a staff is visible or not had to be removed or replaced by a check whether the
part owning the staff is visible.
To support these checks, new method are added, firstSysStaffOfPart(), firstVisibleSysStaffOfPart(),
lastSysStaffOfPart() and lastVisibleSysStaffOfPart().
2020-03-08 22:15:44 +01:00
Howard-C
3bc26748ea fix #301555 part 2: invisible glissandi occupy space 2020-03-07 18:07:48 +08:00
Matt McClinch
008814b2f0 fix #302011: Grace note tie crash
Resolves: https://musescore.org/en/node/302011.

When creating a tie from a grace note to its main note, make sure not to overwrite the main note's chord, thus destroying the grace note and creating a tie from a note to itself.
2020-03-07 01:50:38 -05:00
MarcSabatella
8f6934f1e6 fix #300693: fb continuation not drawn when ending in voice 2
Resolves: https://musescore.org/en/node/300693

Continuation lines are drawn to the right edge of the last note
that starts before the end of the figure's duration.
The code that finds this note was only looking in voice 1.
That resulted in continuation lines ending short, or disappearing,
if the last note was in another voice.

Fix is to be sure to check all voices when searchiing for the end CR.
2020-03-06 15:11:56 -07:00
Agus Terol
ea046a2305 fix #153656: Added advanced preference key io/midi/pedalEventsMinTicks
This preference key represents the minimal amount of ticks that can occur
between a pedal off event and a pedal on event. Currently, its default
value is 1, thus there is no difference with the previous implementation.
When increasing its value, the pedal off event will be moving backwards by
the specified amount of ticks (i.e. it will happen earlier), so that the
distance with the next pedal on (if any) event will grow.
2020-03-06 22:42:18 +01:00
Kumar Kartikay
abc4f7fa95 fix #290034: play repeats button not respected in new score 2020-03-06 13:52:54 +05:30
Joachim Schmitz
b1ab9574cc Use C++ casts 2020-03-03 15:49:37 +01:00
Joachim Schmitz
c9ec1ac5d4 fix some compiler warnings differently/cleaner
as requested/discussed in PR #4989, by using size_t or at least
unsigned instead of casting to int when using the size() method of stl
containers (vectors etc.) in for loops.
Doesn't work everywhere though, not without either adding more casts
elsewhere or with massive code changes or with different compiler(s')
warnings.
Tested with MinGW 64-bit, MinGW 32-bit and MSVC 64-bit.
2020-03-03 14:39:24 +01:00
Dmitri Ovodok
684df202c6 fix #286842: fix assertion failure on adding instrument change to score with parts
Ensure that MIDI mapping gets rebuilt after the correct structure
of instruments has been established for all parts.
2020-03-03 15:28:42 +02:00
Dmitri Ovodok
49ec386a2d
Merge pull request #5781 from mattmcclinch/290987-octave-name
fix #290987: B# and Cb octave change
2020-03-03 14:30:36 +02:00
Matt McClinch
58d603b499 fix #290987: B# and Cb octave change
Resolves: https://musescore.org/en/node/290987.

Make sure that B#, B##, Cb, and Cbb describe themselves as being in the correct octave. This is accomplished by calculating the octave based on what the pitch would be if there were no accidental. Thus, there is no need to special-case certain tpcs.
2020-03-03 01:10:40 -05:00
AntonioBL
5daa2a0ced fix #298108 : Sporadic Crash when dragging a Brace from palette to score using Bravura 2020-03-02 22:22:45 +01:00
Daniel Flynn
fdf1fef643 fix #301753: figured bass under rests
Altered condition within libmscore/figuredbass.cpp to allow for figures to be written under rests
2020-03-01 06:32:29 -06:00
Dmitri Ovodok
56bb3656ae
Merge pull request #5737 from Jojo-Schmitz/wyschnegradsky
fix #301387: add Wyschnegradsky accidentals
2020-02-28 09:55:46 +02:00
Dmitri Ovodok
fc1160ce3b
Merge pull request #5755 from MarcSabatella/301496-volta-navigation
fix #301496: voltas excluded from navigation
2020-02-28 09:51:07 +02:00
Matt McClinch
306cf054b2 fix #299768: Hairpin: when copied, all custom settings are lost and the element resets to default
Resolves: https://musescore.org/en/node/299768.
2020-02-27 10:34:42 -05:00
Dmitri Ovodok
43573a9edd
Merge pull request #5741 from mattmcclinch/301414-paste-tie
fix #301414: Corrupt tie created on paste of tied note that requires additional tie
2020-02-27 14:54:48 +02:00
Dmitri Ovodok
ed32c5b9ec
Merge pull request #5758 from mattmcclinch/301605-add-slur
fix #301605: Undoing slur addition to a range only removes one slur
2020-02-27 12:02:15 +02:00
Dmitri Ovodok
8e00f8bbe2 Fix restricting dragging text elements to page boundaries 2020-02-27 09:38:29 +02:00
Dmitri Ovodok
a4bb2d0beb Remove unused SpannerEditData 2020-02-27 09:35:51 +02:00
Matt McClinch
7e185d280e fix #301605: Undoing slur addition to a range only removes one slur
Resolves: https://musescore.org/en/node/301605.

Prior to this commit, ScoreView::cmdAddSlur() could be called multiple times from within ScoreView::addSlur(), resulting in the need for multiple "undo" commands to completely undo a single "add-slur" command. This commit swaps the names of these two functions, and, more importantly, only calls Score::startCmd() and Score::endCmd() once for the entire operation.
2020-02-25 11:08:45 -05:00
Howard-C
cda31c3382 fix #301555 part 1: invisible arpeggios occupy space 2020-02-25 20:49:57 +08:00
MarcSabatella
ad3b5c2dde fix #301496: voltas excluded from navigation
Resolves: https://musescore.org/en/node/301496

Alt+Left/Right commands were skipping voltas because
we were checking start element and checking against the active staff,
but the start element is actually the measure for voltas.
The main change here is to go ahead and visit the volta
if the active staff if you are navigating the top staff.
Arguably, it could make sense to check for the top *visible* staff,
since that is what the volta at least appears to be attached to.
So I have code here to that.
But I disabled it because in practice,
neither the navigation commands themsevles nor the screen reader
treat invisible staves specially.
So a blind user navigating would have no way of knowing
the top staff is not visible.
So they would likely continue to see it as relevant.

I would not the same issue occurs for system text,
which we always treat as attached to the top staff only.
I added a TODO to indicate where this code would need updating.

Eventually we could consider coming up with some way
of presenting information about hidden staves.
Perhaps in conjunction with a facility allow user
to hide staves on specific systems only,
which seems to be a fairly common request.
2020-02-24 08:02:38 -07:00
Niek van den Berg
123943d83f Fix #280311 - Tie broken when using Split Staff
This issue reports two problems:
  1)  Broken tie for notes under the split pitch.
  2)  Corrupted file because of uncorrect split triplets.

This commit solves the first issue by creating a new Tie when for a note under
the split pitch a forward tie is detected. The patch temporarily saves the
new note and the old pitch in a map in which the old tied is used as key.
When this old tied note is detected, a new tie is created between the two new
notes and the old tie is removed.

The second issue is solved by creating tuplets in the splitted staff. This can
cause tuplets with only rest. These tuplets are not removed, this should
cleaned up by the  Regroup Rhythms function. Unfortunately, this function
isn't able tuplet that well. But that's another issue which should be solved
there.
2020-02-24 08:14:33 +01:00
Matt McClinch
2baa558a12 fix #301478: Relative text position inside a frame is not saved for scores imported from 2.x
Resolves: https://musescore.org/en/node/301478.

When importing scores from 1.x or 2.x, the property flags for styled properties must be set to UNSTYLED. Otherwise, the properties will not be written when the score is saved. ScoreElement::readProperty() should be used wherever possible, since it takes care of setting the property flags correctly. When it is not possible to use ScoreElement::readProperty(), ScoreElement::setPropertyFlags() must be called after setting the property.
2020-02-23 13:00:44 -05:00
Dmitri Ovodok
8641f285aa Fixup for 9f90b895b: fix removal of newly added empty text 2020-02-22 13:04:37 +02:00
Dmitri Ovodok
5a5af39ff6
Merge pull request #5742 from MarcSabatella/301436-last-element-mm
fix #301436: invalid selection when navigating with mmrests
2020-02-22 11:28:42 +02:00
Dmitri Ovodok
9f90b895bf Fix a crash on leaving text edit mode without editing text
Fixup for 5b2853bf92
2020-02-22 11:20:00 +02:00
Dmitri Ovodok
86abf57d45 Avoid redundant Element::staff() calls 2020-02-21 22:27:47 +02:00
Dmitri Ovodok
fa73891c81 Avoid detach() on Qt containers where possible 2020-02-21 22:27:47 +02:00
Dmitri Ovodok
d8d25ed27f Avoid calculating text fragment width if possible 2020-02-21 22:27:47 +02:00
Dmitri Ovodok
3d98ba9ab2 Optimize getting segment tick / staff type in local magnitude and spatium calculations 2020-02-21 22:27:47 +02:00
Dmitri Ovodok
dc4c3040a0 Optimize segment tick calculation when searching for staff type 2020-02-21 22:27:43 +02:00
Dmitri Ovodok
19c438c64c Avoid copying QVariant when searching for style value 2020-02-21 22:27:21 +02:00
Dmitri Ovodok
05d05f40e0 Optimize staff type searching in case of unique staff type 2020-02-21 22:27:15 +02:00
MarcSabatella
b5d53248ab fix #301436: invalid selection when navigating with mmrests
Resolves: https://musescore.org/en/node/301436

The accessibility navigation commands
(Alt+Left/Right, also Ctrl+Alt+Shift+Left/Right)
were not properly checking for mmrests,
resulting in selection of elements in the underlying measures
that were not valid in the current layout.
This adds the necessary checks.
Mostly just a matter of adding "MM" to various function calls.
In a couple of places, the appropriate function did not exist,
so I added it.
Also corrected errors in Ctrl+Alt+Shift+Left/Right
that occurs when going past the end of a staff,
the code to wrap around to the next staff this case well.
In part this is because the implementation of barlines changed
since the code was written.
Barlines are per-staff now even when spanned,
so the use and management of prevTrack is no longer appropriate.
2020-02-21 12:23:26 -07:00
Matt McClinch
2341f8192b fix #301414: Corrupt tie created on paste of tied note that requires additional tie
Resolves: https://musescore.org/en/node/301414.

During paste, if a note has a tie, that tie is remembered as a pending connector which is later added to the score when XmlReader::checkConnectors() is called. If a note is too long to fit in the measure, it is split up into a series of tied notes, but the pending tie needs to be adjusted to begin at the last tied note in the series, instead of at the original note.
2020-02-21 13:15:06 -05:00
AntonioBL
314f8ac625 Fix generation of vtests 2020-02-21 12:11:41 +01:00
Joachim Schmitz
58608ae092 fix #301387: add Wyschnegradsky accidentals + collect_artifacts 2020-02-20 13:35:19 +01:00
Dmitri Ovodok
6631fee136
Merge pull request #5718 from Howard-C/cross-staff-offset
fix #284682: position offset when moving cross-beam notes with the mouse
2020-02-20 13:45:21 +02:00
Dmitri Ovodok
b5772acf88
Merge pull request #5588 from njvdberg/issue-293593
fix #293593 - Issues with ottavas
2020-02-20 13:38:13 +02:00
Dmitri Ovodok
a00781f5b2
Merge pull request #5570 from dmitrio95/295544-endedit-text-undoes-changes
fix #295544: fix reverting non-textual changes made in text editing mode
2020-02-20 13:29:34 +02:00
James Thistlewood
0dcbf2af0f fix #301340: dynamic playback after repeats does not match with score 2020-02-19 21:31:07 +00:00
Niek van den Berg
66be5a18fa fix #293593 - Issues with ottavas
Corrects first problem: Status doesn't display the pitch of note that have an
ottave line. This is solved in Note::tpcUserName().

Solves the second problem in issue 293593: Accidentals do apply if 8va sign is added.
This is solved in Note::updateAccidental(). All calculations are based on the
effective pitch of the a note rather than the actual pitch. The solution now
takes to ottava signs into account by using the actual pitch.

For easily find out wheather an ottava is applied, a new method ottavaCapoFret()
is added which returns the pitch offset by an ottava (or capo fret). To prevent
code dublication, ppitch() also use this new ottavaCapoFret() method.
2020-02-18 11:44:04 +01:00
Matt McClinch
82858514a3 Made cmdList a static vector in Score::cmd(), just like the one in ScoreView::cmd().
Also, fixed the compiler warnings about the unused parameter to the lambda functions in ScoreView::cmd().
2020-02-17 04:53:24 -05:00
Dmitri Ovodok
13acb3be28 Remove redundant includes 2020-02-17 11:06:30 +02:00
Dmitri Ovodok
4aea84c512
Merge pull request #5713 from Howard-C/invisible-articulation
fix #301115: invisible articulations affect layout of other articulations
2020-02-17 10:21:27 +02:00
Dmitri Ovodok
d9a7ffd95d
Merge pull request #5721 from mattmcclinch/301174-restore-selection
fix #301174: Undo selects an extra measure
2020-02-17 09:59:11 +02:00
Niek van den Berg
c75b918723 Fix #290409 - Stave brackets disappear on a 1 line percussion staff
Original code was using the height of the staff to calculate the hight of the
brackets. But for single line staff (percussion instruments!) there is only one
line, resulting in a height of zero, meaning a height of zero.
Now, for single line staves, the height of the barlines is taken. Since barlines
can span several staves in a system the calculation of the barline height has to
implemented in this code itself.
By setting the correct bbox and yOffset for the SysStaff object, this changes will
affect the layout of the system. Compared with version 3.4 all staves of a system
are on exactly the same position.
2020-02-16 12:11:17 +01:00
Matt McClinch
40191074a3 fix #301174: Undo selects an extra measure
Resolves: https://musescore.org/en/node/301174.

When restoring a range selection that ends on the last tick of a measure, make sure that it is not extended to the first tick of the next measure.
2020-02-15 13:42:29 -05:00
Howard-C
cd342246f6 fix #284682: position offset when moving cross-beam notes with the mouse
The staff index did not count `staffMove()` in, which resulted in possibly getting the wrong clef for `line2pitch()`. This commit uses `chord->vStaffIdx()` to get the right staff index.
2020-02-15 20:23:43 +08:00
Joachim Schmitz
6373ac3dfe copy #include <QMultiMap> to all.h
but continue to use it directly in excerpt.h (but before the 'internal'
headers) and use it directly in xm.h and changeMap.h too, which so far
don't seem to include them directly nor indirectly
2020-02-15 12:51:50 +01:00
Dmitri Ovodok
fa199bddee
Merge pull request #5712 from Howard-C/note-events
fix #301116: don't write default note event values along with non-default ones
2020-02-15 11:33:18 +02:00
Howard-C
d83b768f87 fix #301116: don't write default note event values along with non-default ones 2020-02-14 20:26:34 +08:00
Howard-C
6faffe0da4 Fix some spanner segments not scaled after spatium change
Spanner segments need to have `_offset2` scaled too, so I created `SpannerSegment::spatiumChanged()`. For text lines, neither `_offset` nor `_offset2` is scaled, so I called `LineSegment::spatiumChanged()` (which is inherited from `SpannerSegment::spatiumChanged()`) in `TextLineBaseSegment::spatiumChanged()`.
2020-02-14 17:21:26 +08:00
Howard-C
00faebef8c fix #301115: invisible articulations affect layout of other articulations
If the articulation is not visible, don't increase top/bottom distance from chord/staff for the next one.
2020-02-14 16:53:33 +08:00
Howard-C
a433a743ee Enable proper undo for preferSharpFlat property 2020-02-12 21:07:14 +08:00
Dmitri Ovodok
cf7ef336d1
Merge pull request #5697 from Jojo-Schmitz/compiler-warnings
fix MSVC compiler warnings
2020-02-12 10:08:35 +02:00
Matt McClinch
37ccd37db6 fix #300926: Problem selecting and entering a whole note
Resolves: https://musescore.org/en/node/300926.

This allows a full measure rest to be changed into a "normal" rest even if the actual length of the rest is not being changed.
2020-02-11 13:48:37 -05:00
Joachim Schmitz
f5f02cdf6f fix MSVC compiler warnings 2020-02-11 13:29:14 +01:00
Dmitri Ovodok
d82eb9f042
Merge pull request #5264 from jthistle/refactor-single-note-dynamics
Refactor single note dynamics
2020-02-11 13:53:45 +02:00
Dmitri Ovodok
c5b08ae5fc
Merge pull request #5653 from njvdberg/issue-295207-corrupted-mscz
fix #295207 : Mscz file corrupted after splitting a measure
2020-02-11 12:10:18 +02:00
Dmitri Ovodok
80793512d5
Merge pull request #5667 from njvdberg/issue-280343-repeat-measure
fix #280343 - Repeat measure signs: not vertically-centred in tablature
2020-02-11 10:37:33 +02:00
Dmitri Ovodok
9d17cc8127
Merge pull request #5669 from njvdberg/issue-291669-wrong-beams
fix #291699 - Stems and beams for small chords don't align correctly
2020-02-11 10:29:32 +02:00
Howard-C
b249ff69e6 Change written values in MSCX to strings 2020-02-10 20:10:43 +08:00
Howard-C
f4067b5c0f fix #288495: allow user to select flats or sharps for enharmonic key signatures
Resolves: https://musescore.org/node/288495.

A new part property `_preferSharpFlat` is added to let the user decide.
2020-02-10 19:24:43 +08:00
Dmitri Ovodok
32812a2fb9 Merge pull request #5678 from mattmcclinch/300718-nested-tuplet
fix #300718: Cannot increase the duration of a chord/rest within a nested tuplet.
2020-02-10 12:20:28 +02:00
Dmitri Ovodok
db67907f2d Merge pull request #5683 from jthistle/300635-staff-text-symbol
fix #300635: crash when dropping symbol on text that had just been moved
2020-02-10 10:52:11 +02:00
Niek van den Berg
231a4d0135 Completing shortcuts for beaming.
PR5321 solved [#110386]. However, there were still some beaming shortcuts missing and it
was suggested by Jojo-Schmitz to implement there too. Due a misunderstanding from me this
wasn't done by then.
This PR implements these suggestions and makes the shortcuts for beaming complete.
2020-02-10 09:09:38 +01:00
James Thistlewood
48693311d4 fix #300635: crash when dropping symbol on text that had just been moved
This happened because the acceptDrop check wasn't checking that the
editData it had for the text element was TextEditData. So, if the text
had been moved before, then it would have ElementEditData, and
acceptDrop would incorrectly return true.

This fixes the problem by adding a type() method to ElementEditData and
its derived classes so a proper check can be carried out in acceptDrop.
2020-02-09 09:25:11 +00:00
Niek van den Berg
6d99f58ac4 fix # 277712 - repeat sign when add lines
Methods StaffType::doty1() and StaffType::doty2() return the y coordinates for the dots
but these where more or less fixed number in a switch  which was limited to 6 staff lines.

In both methods the switch is now replaced by an simple formula which has in fact no
limitations.
2020-02-07 20:27:01 +01:00
Joachim Schmitz
172411e04a fix #299727: Change Transpose "By Key" to "To Key"
and add a tooltip mentioning that the key is specified at concert pitch.
Renaming all the internals too, for consistency.
2020-02-07 13:07:12 +01:00
Dmitri Ovodok
a564a28b31
Merge pull request #5662 from njvdberg/issue-287998-courtesy-ts-on-measure-delete
fix #287998 and #102676 : Courtesy time signature not removed when subsequent measures are deleted
2020-02-07 13:58:55 +02:00
Joachim Schmitz
5301009829 fix #300738: Ottava (8va/8vb) number is too big 2020-02-07 10:40:36 +01:00
Matt McClinch
d6a80d6c13 fix #300718: Cannot increase the duration of a chord/rest within a nested tuplet. 2020-02-07 00:28:02 -05:00
Niek van den Berg
66099812d8 fix #298541 - Chord symbols deleted on paste
Was partial fixed in Score::makeGap() by defining a filter for deleteAnnotationsFromRange()
and deleteSpannersFromRange(). However, a simiar filter was missing in Score::makeGap1().
2020-02-05 17:21:51 +01:00
Dmitri Ovodok
af3a18f81a fix #300502: fix display of invisible pedals
The issue happened if all pedals in staff in system were invisible.
This led to incorrect Y position being assigned to them.
2020-02-05 10:47:27 +02:00
Dmitri Ovodok
3ec122fc29 Avoid iterating over all spanners when saving ChordRest's slurs 2020-02-04 02:13:25 +02:00
Dmitri Ovodok
a44827b361 Do not create thumbnail on autosave
Creating thumbnails on autosave was already disabled in
4cd48850a3
but only for the first score autosave. Subsequent autosaves still
generated thumbnails. This commit makes all autosaves not create
thumbnails.
2020-02-04 02:07:10 +02:00
Niek van den Berg
57d8a1841f fix #291699 - Stems and beams for small chords don't align correctly
When calculating the length of the beams the width of the stems was neglected.
To support this calculation, a new method lineWidthMag() is the class Stem was
created, returning the scaled width of the stem.
2020-02-03 16:52:40 +01:00
Niek van den Berg
30270e4cbd fix #280343 - Repeat measure signs: not vertically-centred in tablature
Measure rest was drawn on fix y coordinate. Now the y coordinate is calculated
taking the staff height into account so it is always vertically centered.
Also the size of the symbol is sized depending on the staff line distance.
2020-02-02 19:22:05 +01:00
Niek van den Berg
2aafb6fd30 fix #287998 and #102676
Resolves: https://musescore.org/en/node/287998
Resolves: https://musescore.org/en/node/102676

When a measure contains a line or page break **and** the next measure contains a key/time
signature or clef change, a courtesy element is drawn at the end of the measure.
However, if all measures **after** the line or page break are deleted, these courtesy
elements are not removed because Measure::addSystemTrailer(Measure*) is never called
in Score::collectSystem(LayoutContext&) since there is no next measure. As a result
these courtesy elements are not disabled by Measure::addSystemTrailer(Measure*).
The solution is to call Measure::addSystemTrailer(Measure*) even when nm equals 0 and
Measure::addSystemTrailer(Measure*) will disable all courtesy elements in case nm equals 0.
2020-02-01 14:44:53 +01:00
Niek van den Berg
8b7757170b fix #295207 : Mscz file corrupted after splitting a measure 2020-01-30 09:57:50 +01:00
Dmitri Ovodok
c5d735ce48 fix #293181: fix file corruption after reordering linked staves 2020-01-29 18:46:32 +02:00
Howard-C
7b476dbbf7 Improve error message from flip command
Besides notes and slurs there're many other elements which can be flipped.
2020-01-28 16:16:59 +08:00
Howard-C
4732e794c1 fix #299369: crash when pressing numbers/letters in a different voice
Use `staff(pos.staffIdx)->staffType(is.tick())` to make sure `nullptr` won't emerge.
2020-01-28 14:49:00 +08:00
James Thistlewood
91f61ca323 make changes to changemap based on feedback 2020-01-26 17:19:21 +00:00
James Thistlewood
2fb145f706 move changeevent and changemap to revised format 2020-01-26 17:19:21 +00:00
James Thistlewood
50bb690f6f migrate hairpin dynamics and VeloList to more generic ChangeMap 2020-01-26 17:19:21 +00:00
James Thistlewood
642e79c97e Refactor SND
- move most of the logic to velo.cpp and VeloList
- allow dynamic playback of tremolos
- get velocity directly in note collection code
- allow use of poly aftertouch in the future
2020-01-26 17:17:16 +00:00
Dmitri Ovodok
eb4b31315e fix #282492: don't crash on reading MSCX files with invalid measure length 2020-01-25 15:43:13 +02:00
Dmitri Ovodok
103819e1b1 Add framework for handling unrecoverable errors in MSCZ files data
Adds special handling for errors raised with
QXmlStreamError::raiseError() which could be used to detect data
not related to XML format but to MSCX-specific errors.
2020-01-25 15:40:44 +02:00
anatoly-os
ad4955f408
Merge pull request #5640 from dmitrio95/pedal-alignment
fix #284441: implement per-staff alignment of pedal lines
2020-01-25 03:57:28 -08:00
anatoly-os
71137a8a9c
Merge pull request #5629 from dmitrio95/299807-crash-beam-middle-single-note
fix #299807: fix a crash on undoing "Beam middle" setting on single note
2020-01-25 03:56:23 -08:00
Dmitri Ovodok
b115396558 fix #284441: implement per-staff alignment of pedal lines 2020-01-25 11:54:15 +02:00
Joachim Schmitz
42b59d1be1 Split Selection filter for Dynamics/Hairpins and Articulations/Ornaments
as they had been split in the palettes too.
Fixed and added mtests too.
2020-01-23 19:48:25 +01:00
Dmitri Ovodok
ea62a4a9ff fix #290096: fix parts corruption on timewise delete of individual beats
Ensure that all operations in Score::timeDelete() act on all excerpts
rather than only on the current one.
2020-01-23 18:35:05 +02:00
Dmitri Ovodok
994c1c130c fix #299807: fix a crash on undoing "Beam middle" setting on single note
Prevents a crash by avoiding removing a beam from a score (and
recording this to undo stack) if not really necessary.
2020-01-22 12:22:05 +02:00
anatoly-os
152a62fd9a
Merge pull request #5483 from Howard-C/fermata-selection-filter
fix #284073: fermatas do not respond to selection filter
2020-01-21 10:22:53 +02:00
Dmitri Ovodok
56b8742dd4
Merge pull request #5512 from Howard-C/end-drag-delete
fix #298141: crash on deleting an element being dragged
2020-01-21 10:21:45 +02:00
Dmitri Ovodok
e3d44b60a5 Plugin API: merge changes from onScoreStateChanged with user action in undo stack 2020-01-20 13:45:46 +02:00
Dmitri Ovodok
43d0e47d08 Don't show grips on brackets on single click
Currently this leads to a crash on trying to adjust bracket column
in Inspector so revert this change for now.
2020-01-18 15:33:41 +02:00
pereverzev_v
ae794d14e2 Added dragging ability for the beams 2020-01-16 11:09:42 +02:00
anatoly-os
88c531ee23
Merge pull request #5396 from Jojo-Schmitz/more-user-text-styles
fix #277501: support more individual text styles
2020-01-15 02:02:07 -08:00
Dmitri Ovodok
a35d65821e Add a command-line option for transposing a score 2020-01-14 09:42:57 +02:00
Joachim Schmitz
f3627313a1 Fix #299518: Add "Soprano Clef (French, 20th/18th century)" 2020-01-11 12:20:23 +01:00
Dmitri Ovodok
87c14c3633 Enable editing on single click for more elements edited with grips 2020-01-10 15:06:21 +02:00
Dmitri Ovodok
8ac7d265dc fix #299522: fix undoability of edit mode changes for Tuplet, ChordLine, Image 2020-01-10 14:55:21 +02:00
Dmitri Ovodok
5b2853bf92 fix #295544: fix reverting non-textual changes made in text editing mode 2019-12-30 14:01:13 +02:00
Joachim Schmitz
4c54e9f21a playback multiple subsequent grace notes as acciaccaturas
see discussion in https://musescore.org/en/node/277609.
Solves for example the playback of bagpipe embellishments (which are to
be played as acciaccaturas , but not written as such)
2019-12-29 13:38:39 +01:00
Dmitri Ovodok
46ab175e02
Merge pull request #5391 from WcRnm/285040-triplet-rest-duration-change-crash
fix #285040 crash when changing a triplet's rest's duration
2019-12-27 14:06:54 +02:00
Dmitri Ovodok
48235c4d55
Merge pull request #5550 from Kartikay26/278169-image-attached-to-rest
fix #278169: images attached to rests not imported from MuseScore 2
2019-12-27 11:22:27 +02:00
pereverzev_v
e71f45e0d2 Added middle grip for beams for moving whole beam horizontally 2019-12-27 10:09:59 +02:00
Kumar Karikay
0d1262d25c fix #278169: images attached to rests not imported from MuseScore 2
Resolves: https://musescore.org/en/node/278169

The code to read an Image tag attached to a note was present in read206.cpp
but the analogous code for a rest was missing. The same has been added.
2019-12-27 13:00:53 +05:30
Matt McClinch
2f2d9e316e fix #298959: Note changes pitch, but accidental is not changed
Resolves: https://musescore.org/en/node/298959.

Note: In the following paragraphs, I use the word "microtonal" to refer to all accidentals for which Accidental::isMicrotonal() currently returns true. That is, all proper microtonal accidentals as well as NATURAL_FLAT, NATURAL_SHARP, and SHARP_SHARP.

When force adding or force removing an accidental, Score::changeAccidental() will remove a note's existing accidental (if any) from the score. When not force adding or force removing an accidental, the note's pitch is changed, but the accidental is left alone until Note::updateAccidental() is called. But Note::updateAccidental() does not touch microtonal accidentals, so any existing microtonal accidentals must be removed in Score::changeAccidental().

Also, when changing from a microtonal accidental to a non-microtonal accidental that results in the same change to the pitch of the note, the new accidental's role is currently set to USER every time, when in fact this should only be done if it truly is a courtesy accidental. So when determining whether or not the accidental is being force added, when we are comparing the new pitch to the old pitch, we should also look at whether the old accidental was microtonal or not, to make sure that the accidental's role is not being set incorrectly.
2019-12-26 15:21:03 -05:00
Dmitri Ovodok
a15a869e6e
Merge pull request #5557 from Howard-C/section-break-not-save
[Inspector] [Regression] fix #298913: new section break inspector lose data
2019-12-26 13:15:59 +02:00
Howard-C
1b918568d1 fix #298913: new section break inspector lose data
This is because `read()` and `write()` aren't updated to "inspector style" (which deals with `Pid` instead of variables in class).
2019-12-26 18:49:22 +08:00
Howard-C
9c7e98145c fix #297738: "generate key signatures" in staff type change does not work
`staff()->genKeySig()` always checks for `Fraction(0, 1)` while `staff()->staffType(tick())->genKeysig()` checks for the property at the exact tick.

The patch also fixes the `StaffType` generation of tablature staves, making `genKeysig` default (and always) to false.
2019-12-26 16:39:43 +08:00
Dmitri Ovodok
57c68856a2
Merge pull request #5549 from Howard-C/keysig-inspector
[Inspector] issues of key signature inspector
2019-12-26 10:21:26 +02:00
anatoly-os
a4ce8b8555
Merge pull request #5548 from Jojo-Schmitz/warnings
Fix compiler warnings
2019-12-26 00:24:58 +02:00
anatoly-os
1071637d7a
Merge pull request #5551 from vpereverzev/fret_inspector_offset_update
Fret layout triggering
2019-12-26 00:23:28 +02:00
Howard-C
d7d0465b03 code formatting (for single-click implementation) 2019-12-26 00:24:52 +08:00
Dmitri Ovodok
89b2c34e61
Merge pull request #5502 from Git-Lior/bugfix-select-more
fix #297549: Selecting notes by duration matches notes with different duration
2019-12-25 14:04:20 +02:00
Dmitri Ovodok
1dd409d417
Merge pull request #5341 from mattmcclinch/279179-accidental-state
fix #279179, fix #293984: Natural-sharp/natural-flat not recognized as same accidental as sharp/flat
2019-12-25 12:08:03 +02:00
Dmitri Ovodok
fb18567d8f
Merge pull request #5511 from mattmcclinch/add-interval
fix #298121: Adding Intervals (above/below) should take into consideration the accidental toggle state
2019-12-25 11:59:06 +02:00
pereverzev_v
b308211f8b Added trigger layout that will update layout position of a fret and internal values like offset in the inspector 2019-12-25 10:11:26 +02:00
Joachim Schmitz
6562d5c27b fix more MSVC warnings
and fix code style on the way
2019-12-24 17:08:36 +01:00
Howard-C
16ea17b8ba fix layout of key signature inspector
Removed an unnecessary horizontal layout and put all widgets in a single panel layout.
2019-12-24 21:30:23 +08:00
pereverzev_v
bc8d6ffcd1 Adjusted code formatting for NoteEditData and recovered note direction angle limit to origin 15 degrees 2019-12-24 14:20:36 +02:00
Dmitri Ovodok
24e239ed74 Fix a crash on removing HBox from a score 2019-12-24 14:20:36 +02:00
pereverzev_v
e1073c5c98 Added boundaries for the left-side note dragging 2019-12-24 14:20:36 +02:00
pereverzev_v
6b7e2d25a2 Explicitly initialized pointers to neighbour segments 2019-12-24 14:20:36 +02:00
pereverzev_v
6318b490e2 Synchronized position of the cursor to note position while dragging 2019-12-24 14:20:36 +02:00
pereverzev_v
e0c9e8d353 Adjusted note drag direction recognition 2019-12-24 14:20:36 +02:00
pereverzev_v
767fcae3b1 Allowed to drag note in both directions at normal mode accordingly to angle 2019-12-24 14:20:35 +02:00
pereverzev_v
a8509dc3e1 Allowed the user to adjust the left angle of a beam 2019-12-24 14:20:35 +02:00
Dmitri Ovodok
2f443cf898 Fix inability to horizontally move hairpin with its middle or left handle with mouse 2019-12-24 14:16:06 +02:00
Dmitri Ovodok
5c3b407dae Move setting up grips out of Element::startEdit() 2019-12-24 14:16:06 +02:00
Dmitri Ovodok
f84f889d8e Basic implementation of single-click access to editing elements with grips 2019-12-24 14:15:35 +02:00
Dmitri Ovodok
a6f4b33d6d Remove unused startEdit* function from libmscore, remove redundant overrides 2019-12-24 14:15:35 +02:00
Dmitri Ovodok
8ef77667fd Remove unused MuseScoreView::gripCount() function 2019-12-24 14:15:35 +02:00
Dmitri Ovodok
4deac5f6d0 EditData cleanup
- Remove unused EditData::init() function
 - Remove unused EditData::duration field
 - Prevent memory leaks with ElementEditData descendants
2019-12-24 14:14:55 +02:00
Dmitri Ovodok
e2d78395fc Add missing isLasso() method 2019-12-24 14:14:21 +02:00
Dmitri Ovodok
4c1da2e330 Extract ScoreView::textEditMode() 2019-12-24 14:14:19 +02:00
Dmitri Ovodok
02f6aae684
Merge pull request #5524 from Howard-C/italian-tab
fix #298362: pressing number after mouse click works for a different line in "Italian" styled tablature staff
2019-12-24 13:56:16 +02:00
Dmitri Ovodok
bb78c390fa
Merge pull request #5487 from mattmcclinch/297454-local-time-signature
fix #297454: Corruption in local time signature
2019-12-24 12:04:48 +02:00
Dmitri Ovodok
26fc40409f
Merge pull request #5531 from MarcSabatella/297883-copy-harmony
fix #297883: multiple chord symbols not copied
2019-12-24 11:03:47 +02:00
Dmitri Ovodok
bfc77c6b7d
Merge pull request #5338 from mattmcclinch/52151-beam-auto
fix #52151: "Auto" beam setting for *Rests* should not beam
2019-12-24 10:53:20 +02:00
Dmitri Ovodok
13649eb47d
Merge pull request #5538 from MarcSabatella/298564-slur-shift
fix #298564: shift of manually adjusted slur on small staff
2019-12-24 10:29:56 +02:00
anatoly-os
ca87afadba
Merge pull request #5529 from luzpaz/various-typos
fix various typos
2019-12-24 09:49:53 +02:00
anatoly-os
21222fbbe9
Merge pull request #5530 from Jojo-Schmitz/odd-crash
fix #298490: Musescore crashes when trying to open a specific score
2019-12-24 09:39:17 +02:00
Howard-C
ef42b1b4e9 fix #295310: add an advanced preference option of disabling backup file generation 2019-12-23 23:12:17 +08:00
Joachim Schmitz
c1d2d1844c fix colors 2019-12-19 16:47:02 +01:00
anatoly-os
41e64aa332 update basic MuseScore colours
Change the colours of voices, buttons, highlight
@dmitrio95 Palettes highlighting must be adapted (fixed) asap
2019-12-19 16:56:49 +02:00
luz.paz
f31624d746 fix various typos
* Found via `codespell -q 3 -S ./share/locale,./thirdparty -L ba,cann,clas,dur,foto,iff,nd,ois,ot,pres,possibile,snaped,strack,tage,te,uint,thru,valu`  
* Some revisions made per feedback given during review.
* Follow-up typos for review  
* Add revisions per feedback
2019-12-19 06:13:30 -05:00
Dmitri Ovodok
9a8d4fa50e fix #298188: fix not playing a note if its articulation playback is turned off
Complements the fix in c136532975 to
take "play" property of articulations into account in MIDI rendering.

Also fix a test for this to be actually executed and to cover the
case of single-note dynamics MIDI rendering.
2019-12-18 14:17:17 +02:00
Dmitri Ovodok
1bdeea30c1 fix #298196: fix incorrect barline drawing after edit drag ends
Move updateGrips() and other view state-related calls after an
score()->endCmd() call so grips are always updated with actual
layout state.

Also reset BarLineEditData parameters in BarLine::endEditDrag()
2019-12-17 12:06:01 +02:00
anatoly-os
bef233838d
Merge pull request #5450 from mgavioli/fix_282893_FigBass_dur_lines_too_thin
Fix #282893 : Fig.Bass duration lines exceedingly thin
2019-12-16 19:25:07 +02:00
MarcSabatella
29a9ee0970 fix #298564: shift of manually adjusted slur on small staff
Resolves: https://musescore.org/en/node/298564

We currently write the offsets for slur grips
scaled according to the staff, but we read them
scaled according to the score.  That's because
on read, the slur hasn't been added yet, so the track is not set.
I fixed the exact same issue for other lines in
812a2811b9
but slurs have their own own read/write and I neglected
to make the corresponding change for them.
This fixes the issue by explicitly scaling according to score.
Note there are other reasons why this makes sense,
see other comments in https://github.com/musescore/MuseScore/pull/4827
for more information on the scaling of offsets and other properties.
2019-12-16 10:18:12 -07:00
Dmitri Ovodok
366e92e346
Merge pull request #5448 from dmitrio95/mtest
Enable covering more mscore code with automatic tests, add tests for workspaces editing
2019-12-16 11:45:22 +02:00
Joachim Schmitz
3e08b3fdf4 fix #298490: Musescore crashes when trying to open a specific score 2019-12-15 11:10:33 +01:00
MarcSabatella
93ac2c5b85 fix #297883: multiple chord symbols not copied
We have code to replaced existing chord symbols in the destination
when copying and pasting.
Unfortunately, if there are multiple chord symbols to paste on a tick,
that same code causes each chord symbol to replace the one just pasted.
End result is only the last chord symbol is preserved.
This change uses a container pastedHarmony to track the chords symbols
as we paste them, so we can check and not delete them later.
2019-12-14 14:38:22 -07:00
Dmitri Ovodok
d45808c56f Fix compiler warnings on gcc 8.3
The following warnings are covered:
this statement may fall through [-Wimplicit-fallthrough=]
type qualifiers ignored on cast result type [-Wignored-qualifiers]
2019-12-14 15:20:58 +02:00
Dmitri Ovodok
206a88a116 fix #291569: don't forget to notify views of layout change in line mode 2019-12-14 11:29:47 +02:00
MarcSabatella
2532e010f5 fix #298471: strings with no X or O render as ? on Linux
Resolves: https://musescore.org/en/node/298471

Strings in fret diagrams with no X or O have no marker,
but in some Linux systems, we are rendering a "?" character,
as we are actuall trying to draw a null character in FreeSans,
and that is the result depending on the specific version
of the font, rendering libraries, etc.

Fix is simplky to skip the draw if the market is null.
This is the approach used in the Inspector,
and is also what was done prior to the big fret diagram refactor,
2019-12-12 14:14:22 -07:00
Howard-C
a349116dc1 fix #298362: pressing number after mouse click works for a different line in "italian" styled tablature staff
Resolves: https://musescore.org/node/298362.

This is because the string number is reversed for number pressing (for upside-down tablature staves) while in fact it isn't needed. So a physStringToVisual() is called in this patch to eliminate the effect. See https://musescore.org/en/node/298362#comment-965223.
2019-12-10 23:23:13 +08:00
MarcSabatella
1c15bb0e49 fix #298273: divider not displayed in some cases
Resolves: https://musescore.org/en/node/298273

System dividers were not being displayed in certain cases:
if a fixed spacer is used, or in single page view.
In addition, dividers were displaying that shouldn't be
if layout changes and a system that was formerly not last on page
suddenly becomes last on page,
This is due to a series of errors in layoutPage()
where the dividers are managed.
This fix involves a number of aspects:
1) checkDivider now takes an extra boolean parameter to force deletion
2) we always call checkDivider with that parameter set to true
for the last system of a page
3) in the case where we don't stretch system distance
(the clause checking sList, noVerticalStretch, or System layout mode),
don't just remove dividers, but do the normal checkDivider call,
which adds or removes dividers as appropriate
4) in the calls to checkDivider at the end of the function
(which handle the normal case of non-final systems on the page),
dion't skip the checkDivider calls if a system hasFixedDownDistance.
I believe that check was added because it is appropriate in other places
that also check vBox, so it may have looked like this code should match.
But it shouldn't, there is no reason to skip dividers in this case.
Only the stretch calculations should be skipped.
2019-12-09 21:23:13 -07:00
Dmitri Ovodok
e3e498ce8e
Merge pull request #5383 from AntonioBL/tremolofixes
fix #288576 : strange results when changing time signature with tremo…
2019-12-05 14:58:13 +02:00
Dmitri Ovodok
5a0ad44cfb
Merge pull request #5443 from mattmcclinch/296329-instrument-change-mmrest
fix #296329: Instrument change should be able to apply to multimeasure rest
2019-12-05 14:57:26 +02:00
Dmitri Ovodok
2228f94822
Merge pull request #5462 from Howard-C/section-break-properties
move Section Break Properties into Inspector
2019-12-05 14:40:51 +02:00
Dmitri Ovodok
ed0d4cd0d2
Merge pull request #5425 from shoogle/rnib-hairpin-speech
Accessibility: Improve speech for chordrests with spanners
2019-12-05 14:36:26 +02:00
Dmitri Ovodok
8f107f34dc
Merge pull request #5451 from dmitrio95/296426-mmrest-barline-text-links
fix #296426: fix not linking multiple elements at the same tick in MM rests on score loading
2019-12-05 14:34:25 +02:00
Dmitri Ovodok
d243bcea83
Merge pull request #5477 from MarcSabatella/281253-spacer-down-system
fix #281253: staff spacer down ignored on bottom of page
2019-12-05 14:15:22 +02:00
Dmitri Ovodok
90be292944
Merge pull request #5458 from MarcSabatella/295892-barline-before-frame
fix #295892: barline not displayed before horizontal frame / start repeat
2019-12-05 14:06:22 +02:00
Howard-C
6fd217c017 fix #298141: crash on deleting an element being dragged
When the element is being dragged, it is selected, but if it's deleted, then the selection changes. This causes `this` in `endDrag()` to change to the parent element, but since the `EditData` parameter (`ed`) is still that of the deleted element, `ed.getData(this)` returns a `nullptr` which directly leads to a crash.
2019-12-05 19:55:46 +08:00
Matt McClinch
573280f1ca fix #298121: Adding Intervals (above/below) should take into consideration the accidental toggle state
Resolves: https://musescore.org/en/node/298121.

In addition to making the "Add Interval" commands apply the highlighted accidental when in note input mode, I have corrected a few cases where I had chosen the wrong tpc to use to calculate the AccidentalType for a user accidental, given the current value of styleB(Sid::concertPitch).
2019-12-04 23:07:55 -05:00
Dmitri Ovodok
c194377dc7 Improve testing infrastructure
- Improve ability to test mscoreapp in mtest framework
 - Expand testutils
2019-12-04 11:11:58 +02:00
Dmitri Ovodok
a96b72c2fe fix #298061: fix a crash on "set as style" if score ends with a frame
- Don't pass staff number to adjustCanvasPosition if trying to
   adjust viewport to a frame. This avoids a crash itself.
 - Implement a more robust approach to determine a measure relevant
   to the current edit operation in CmdState. This avoids trying to
   unnecessarily jump to the frame at the end of a score.
2019-12-04 02:22:55 +02:00
Dmitri Ovodok
431961b436
Merge pull request #5507 from Howard-C/courtesy-accidental
fix #292648: make courtesy accidentals stay if notes are changed using Ctrl+Up/Down
2019-12-03 12:35:28 +02:00
Dmitri Ovodok
2d140a341d Sort notes in a chord taking into account unison index of tied notes
Fixup to f6998a40e3: needed to avoid
a possibility to tie two different notes to one.
See https://github.com/musescore/MuseScore/pull/5506#issuecomment-560370517
2019-12-03 10:38:42 +02:00
Dmitri Ovodok
116f3eb8a9
Merge pull request #5506 from mattmcclinch/297957-search-tie-note
fix #297957: Ties extended in region after time signature change
2019-12-03 10:37:51 +02:00
Howard-C
b258c85c58 fix #292648: make courtesy accidentals stay if notes are changed using Ctrl+Up/Down 2019-12-03 09:39:43 +08:00
Dmitri Ovodok
3d9c900d32
Merge pull request #5481 from Jojo-Schmitz/segment-violation
fix #297326: Crash on opening Musescore 2.x file that uses leading space setting on the initial clef
2019-12-02 13:52:04 +02:00
Dmitri Ovodok
c8a27535c2 fix #297468: fix a crash on reading a corrupted score with linear layout mode in part
In a corrupted score tick values may sometimes be not synchronized
between master score and parts. This may lead to incorrect setting
of layoutAll flag as ticks from different scores are compared.
Ensuring that only master score ticks are compared fixes layoutAll
flag for scores corrupted that way and prevents a crash due to not
making a full layout on score loading. This change makes no
difference for correctly saved scores.
2019-12-02 12:24:41 +02:00
Dmitri Ovodok
cf80fd34df fix #297614: fix moving viewport to irrelevant position when editing spanner segment 2019-12-02 12:23:47 +02:00
Matt McClinch
f6998a40e3 fix #297957: Ties extended in region after time signature change
Resolves: https://musescore.org/en/node/297957.

When searching for a note to complete a tie, what matters is not so much that the note doesn't already have a tieBack(), but rather that the two notes have the same unisonIndex().
2019-12-01 22:45:48 -05:00
Git-Lior
75df39e413 fix #297549: Selecting notes by duration only matches durationType (Eighth, 16th) and ignores tuplets
This commit fixes the "Same duration" field's bug by adding an additional field - same note length. The original field matches note's `actualDurationType` and the new one matches the `actualTicks` value
2019-12-01 23:43:38 +02:00
AntonioBL
fb55f7e856 fix #288576 : strange results when changing time signature with tremolo between two notes 2019-11-25 16:05:23 +01:00
Dmitri Ovodok
8a789db0aa
Merge pull request #5491 from Howard-C/4-4-to-alla-breve
fix #297477: apply alla breve to 4/4 changes to 2/2 instead
2019-11-25 11:46:05 +02:00
Dmitri Ovodok
62412f2650
Merge pull request #5492 from dmitrio95/palettes-fixes
Miscellaneous visual and UX fixes
2019-11-25 11:41:53 +02:00
Dmitri Ovodok
fb09b011b8
Merge pull request #5486 from dmitrio95/cannot-paste-into-tuplet
fix #52906, fix #279990, fix #288019: relax restrictions on pasting to tuplets
2019-11-25 11:41:34 +02:00
Dmitri Ovodok
1e22383d06
Merge pull request #5493 from Git-Lior/bugfix-paste-stickings
fix #297514: Cannot copy and paste stickings
2019-11-25 11:38:31 +02:00
Matt McClinch
b616cb97f2 fix #297544: Nested beams created
Commit 74421ac inadvertantly removed an important case for when a ChordRest should be detached from its former beam. This commit adds that case back.
2019-11-24 12:09:24 -05:00
Howard-C
72c6b76708 fix #297477: apply alla breve to 4/4 changes to 2/2 instead
Resolves: https://musescore.org/en/node/297477.

4/4 and alla breve have different `_sig` value, so `setSig()` is called, but if it's called after `_timeSigType` is changed, `setSig()` will make the type `NORMAL` again, because if it's called by `setProperty()`, there isn't a `TimeSigType` parameter available (making it available will cause further issues), so `setSig()` uses the default `NORMAL` as the type, thus the new type is overwritten.

If `setSig()` is called before `_timeSigType` is changed, all will be fine.
2019-11-23 23:44:04 +08:00
Git-Lior
d6a27f86a3 fix #297514: Cannot copy and paste stickings
when handling paste, a switch statement is used on dropElement.type() (result is of type ElementType). Before this commit, there was no case for ElementType::STICKING, and paste wouldn't work (default behavior).
2019-11-23 17:30:22 +02:00
Dmitri Ovodok
966ddc23a0 Rework tie button logic when out of note input mode
Now "Tie" button:
 - is highlighted when all selected notes have ties;
 - if any ties can be added, adds ties;
 - if no ties can be added, removes existing ties.
2019-11-23 13:19:54 +02:00
Dmitri Ovodok
d34f1b838d Enable changing notes duration if selecting note stem, hook or a range 2019-11-23 13:19:54 +02:00
Dmitri Ovodok
85eb26a5eb Warn for note being out of instrument range if note is selected 2019-11-23 13:19:54 +02:00
Dmitri Ovodok
49fedc47c4 fix #297428: crash on copying measure with slur and pasting it to TAB staff
1) Fix incorrect track2 assignment to spanners on pasting in some
situations due to not handling the case of track2 == -1.
2) Fix staff index checks in ScoreView code to avoid a crash if
incorrect staff index gets recorded to CmdState.
3) Add an assertion to catch invalid negative staff indices recorded
to CmdState.
2019-11-22 16:17:51 +02:00
Dmitri Ovodok
ba07089407 fix #296915: honor slur properties when adding slur from a palette 2019-11-22 16:16:59 +02:00
Dmitri Ovodok
145ffc0309 Adjust double-click value for mixer sliders
Fixup for 8bac1fddde

Also remove connection to a PlayPanel's gainChange signal which
doesn't exist anymore.
2019-11-22 15:04:32 +02:00
Matt McClinch
f1e2d51970 fix #297454: Corruption in local time signature
Resolves: https://musescore.org/en/node/297454.
2019-11-21 16:05:06 -05:00
Dmitri Ovodok
336e1e59b0
Merge pull request #5469 from vpereverzev/master
fix #297008 : note_input_mode_selection
2019-11-21 13:31:36 +02:00
Dmitri Ovodok
5f079ced2c fix #52906, fix #279990, fix #288019: relax restrictions on pasting to tuplets
1) Pasting symbol lists (lyrics, dynamics, chord symbols etc.) to
tuplets work correctly so we don't need to impose any restrictions
here.

2) Pasting a staff range to the first chord/rest of a tuplet correctly
replaces the tuplet with the clipboard content. We need to restrict
pasting a range only if trying to paste to the middle of a tuplet.
2019-11-21 12:29:33 +02:00
Dmitri Ovodok
5903bbcae7
Merge pull request #5452 from Howard-C/copy-crash
fix #296591: pasting two voices on multimeasure rests leads to crash
2019-11-21 10:20:54 +02:00
pereverzev_v
8562cdae63 fix #297008 Repeated behavior of transition to note input mode accordingly to cases when no items selected
Turn on note input mode by toggling pad even if user selection is on the text element for example
2019-11-21 10:08:25 +02:00
MarcSabatella
10b3da92db reimplement firstVisibleSysStaff and lastVisibleSysStaff to return int
Previosly, these functions returned the SysStaff itself,
but there is no way to get the numeric index from that.
The functions now return the numeric index,
and their callers are adjusted to derived the SysStaff from that
(if necessary, in one case the index was the goal all along).
2019-11-20 13:42:09 -07:00
MarcSabatella
1d56d5564b fix #281253: staff spacer down ignored on bottom of page
Resolves: https://musescore.org/en/node/281253

A staff spacer on the bottom system of a page does not work correctly:
we are looking foir a spacer on the *first* staff rather than the *last*.
So a spacer on the last staff is ignored, and one on the first is used
when it shouldn't be.

The code to calculate the amount of spacer required below the last
system of a page relies on System::lastVisibleSysStaff(),
which is return the correct SysStaff, but we are then attempting
to access the idx member, which has never been set up and is always 0.
Fix is to initialize idx when setting up the list of staves.
2019-11-20 12:37:41 -07:00
Howard-C
a2c2cdcd5a fix #284073: fermatas do not respond to selection filter 2019-11-19 18:59:06 +08:00
Joachim Schmitz
d9abdeb0ea fix #297326: Crash on opening Musescore 2.x file that uses leading space setting on the initial clef
which seems to not belong to any segment, so dereferences a NULL pointer
leading to a segment violation (pun intended).
The fix simply ignores this, and this avoids the crash, but also looses
the 'visible' property of that clef for some yet unknown but unrelated reason.
2019-11-19 10:27:51 +01:00
Dmitri Ovodok
e5d93481e0
Merge pull request #5049 from mattmcclinch/166116-slur-end
fix #166116: Slurs terminate in wrong spot in voices other than 1
2019-11-18 16:56:53 +02:00
Matt McClinch
4c5e7459ce fix #289254: Beam in edit mode always switches to right grab handle 2019-11-18 08:54:23 -05:00
Matt McClinch
d173093c40 fix #166116: Slurs terminate in wrong spot in voices other than 1 2019-11-18 08:09:43 -05:00
Dmitri Ovodok
34d7d320c9
Merge pull request #5444 from mattmcclinch/296363-repitch-accidental
fix #296363: Accidental shortcuts do not work in Re-Pitch mode
2019-11-18 14:28:14 +02:00
Dmitri Ovodok
20fe03cf18
Merge pull request #5398 from mattmcclinch/276511-upside-down
fix #276511: Entering notes with mouse fails in Italian TAB
2019-11-18 14:05:17 +02:00
Dmitri Ovodok
6638eaf980
Merge pull request #5275 from mattmcclinch/293459-tied-unisons
fix #293459: Tie command does not properly handle chords with unisons
2019-11-18 11:48:19 +02:00
Dmitri Ovodok
e6e1f209fd
Merge pull request #5147 from mattmcclinch/291053-keysig-mmrests
fix #291053: Bad key change after undoing the enabling of multimeasure rests
2019-11-18 11:37:19 +02:00