Commit graph

298 commits

Author SHA1 Message Date
Matt McClinch
282386da91 fix #294866: The direction of beamed notes does not immediately change when the beam is broken
Resolves: https://musescore.org/en/node/294866.

When a ChordRest is removed from its beam during layout, we need to relayout its old beam. This will cause a recalculation of the stem direction, in case it needs to change.
2019-09-27 13:50:43 -04:00
Marc Sabatella
5eccc30d1a fix #294237: optimize reading of extra information for notes and rests
In the original implementation of accessibility,
we had the screenreader always read all extra information associated with a chord
(including articulations, lyrics, staff text, etc)
every time a note in that chord was selected.
This was necessary becayse we had no no way at the time to reach those elements individually.
Now that the next/previous element commands can access those elements directly,
we no longer need to read them on selection of the note.
And yet, reading this information on ordinary navigation (left/right) is not without value.
So this change simply limits the reading of the extra info to the top note of a chord,
and even then also checks voices for segment annotations.
The result is, when navigating, you'll hear the extra information read
when the chord is first hit, because we navigate chords top to bottom,
ut will not hear the extra information repeated for each subsequent note in the chord.
Beat information continues to be read always.
2019-09-17 13:35:09 +02:00
anatoly-os
d7c3b701d3
Merge pull request #5250 from Jojo-Schmitz/warnings
fix compiler warnings reg. comparing signed and unsigned and some unused parameters
2019-08-29 10:39:06 +02:00
Joachim Schmitz
3012c827dd fix compiler warning reg. comparing signed and unsigned and unused parameters
for some strange reason `QList::size()` returns `int` rather than
`size_t`, IMHO a bug in Qt, as even a `QList` can't have a negative
number of members.
And fix another warning reg. shadowing a local variable as well as reg.
some unused parameters
2019-08-27 12:10:27 +02:00
Joachim Schmitz
a53bac4711 replace slashStyle with stemless
and all related things along with it, including a compatibility layer
2019-08-19 15:07:30 +02:00
Marc Sabatella
320c1081e4 fix #281448, fix #283463: accessibility for articulations and lyrics
Articulations needed to be added to Chord::accessibleExtraInfo.
Also, refactoring was needed to move code around as a result of
articulations and fermatas being moved between Chord and ChordRest.
2019-08-17 10:44:58 +02:00
Marc Sabatella
510b60ce45 fix #289312: offsets on elements of chords and rests not scaling with staff 2019-05-18 09:32:39 -06:00
Matt McClinch
5aa7cca1da fix #288609: Crash when creating parts if a rest on a wrong staff after using cross-staff notation 2019-05-06 13:51:26 -04:00
Marc Sabatella
6b7f33ec64 fix #278999, fix #288474: autoplace customization 2019-05-01 07:52:11 -06:00
Dmitri Ovodok
a017d8e5a1 Allow changing duration of multiple notes 2019-04-17 14:41:05 +03:00
anatoly-os
4898128389
Merge pull request #4831 from dmitrio95/hairpin_paste
Allow copy-pasting hairpins and hairpin+dynamics combinations
2019-03-28 15:14:42 +02:00
Dmitri Ovodok
c789322faa Allow copy-pasting hairpins and hairpin+dynamics combinations 2019-03-27 10:24:08 +02:00
Dmitri Ovodok
1f8176aebe fix beams and tuplets memory leaks 2019-03-20 10:23:29 +02:00
Marc Sabatella
b4019070ee fix #279259: chord symbol spacing fixes 2019-03-15 10:51:32 -06:00
Marc Sabatella
2c6b33696a fix #284235: implement lyricsMinDistance 2019-02-18 09:42:15 -07:00
ws
ec3be9a99a Replacd integer midi tick values by fractions.
- tick names a position on the time axis
- tick is always a Fraction()
- only Measure() and Segment() (and Tuplet?) have a tick value
- tick() for an generic element return only a sensible value if isMeasure() or isSegment() or isSegment(parent())

- "ticks" names a duration stored in a Fraction()
- the tick value for an Segment is relative to its measure

- rename "duration" to "ticks"
- rename afrac() to tick()
- rename rfrac() to rtick()
- rename some variables, changing "fraction" into "tick"
  (example: actualFraction() into actualTicks())

- Lyrics ticks are written as Fraction, on read if xmlreader sees a "/" it reads a fraction
  else midi ticks for backwards compatibility
2019-02-18 11:46:05 +01:00
Dmitri Ovodok
acdc76f958 fix #280775: fix inserting text elements on MM rest via shortcut 2018-12-28 12:22:20 +03:00
Matt McClinch
34f261df2a fix #273302: Fermata loses assignment to voice and direction 2018-12-20 06:13:51 -05:00
MarcSabatella
96beda29cc fix #280055: chord symbol stays high 2018-12-14 18:16:59 -07:00
MarcSabatella
aed4c73fbc fix #279950, fix #279804, fix #279666: force chord symbol layout where needed 2018-12-13 20:25:30 -07:00
anatoly-os
f2151f510d
Merge pull request #4319 from mattmcclinch/tuplet-element-selection
fix #279465: Selection extends beyond intended tuplet element
2018-12-06 16:20:45 +02:00
anatoly-os
9eb907c20d
Merge pull request #4316 from dmitrio95/278940-glissando-spacing
fix #278940: restore chords spacing for glissando
2018-12-05 21:40:33 +02:00
Matt McClinch
8599f4d6e7 fix #279465: Selection extends beyond intended tuplet element 2018-12-05 13:59:49 -05:00
Dmitri Ovodok
6e5de1926c fix #278940: restore chords spacing for glissando
This adds also a way to differentiate types of horizontal spacing.
The underlying implementation (zero-height shape elements) still
remains the same.
2018-12-05 16:34:35 +02:00
MarcSabatella
548febab90 fix #279303: chord symbol style defaults 2018-12-03 14:02:40 -07:00
MarcSabatella
4161a1fbe7 partial fix #279259: chord symbol spacing 2018-12-02 15:04:52 -07:00
ws
23e9b8eb57 fix #277759 Chord symbols sometimes add (much) too much space to measure 2018-11-29 17:44:44 +01:00
mirabilos
77983234c8
some spelling fixes
most from the spell checker built into Debian’s automated
package checking tool lintian, two from me during applying
those lintian-suggested fixes
2018-11-27 22:49:18 +01:00
Joachim Schmitz
df4aa9b612 more pre-translation text fixes
removing some, correcting others, capitalization, pluralization,
commenting to aid translators, ec.
2018-11-24 22:28:34 +01:00
ws
679e9f8f78 fix #278121 Slurs are list in parts 2018-11-19 13:32:15 +01:00
anatoly-os
b95c4b7ef7
Merge pull request #4111 from mattmcclinch/277861-multiple-fermatas
fix #277861: Multiple fermatas added to chords
2018-11-14 23:05:50 +02:00
ws
d2e452040b fix #278099 Crash when inserting a symbol from master palette 2018-11-13 13:32:33 +01:00
Matt McClinch
c8945379aa fix #277861: Multiple fermatas added to chords 2018-11-06 12:04:34 -05:00
ws
ce128f3ed8 fix #277276 Chord symbols don't allocate space horizontally 2018-10-28 11:39:48 +01:00
Joachim Schmitz
851a79917c fix compiler warnings due to unused parameters and variable shadowing
the former reported ny MinGW and MSVS, the latter only by MSVC
2018-10-27 12:14:13 +02:00
James Thistlewood
32f8767c17 fix #277497: adding text causes crash in debug mode 2018-10-27 10:10:40 +01:00
ws
84dbe94a74 fix styleChanged() 2018-10-25 16:27:18 +02:00
ws
96af32eee7 fix regressions: layout of misc. elements 2018-10-25 15:44:21 +02:00
ws
d77183b3bb refactoring of Element::userOff and TextBase::offset 2018-10-18 11:56:23 +02:00
Matt McClinch
d826a43a8c fix #276868: Adding barline in mid-measure fails 2018-10-05 12:26:05 -04:00
Dmitri Ovodok
05ef08305b Rename a tag for Chord's staff move property from <move> to <staffMove> 2018-08-16 19:10:29 +03:00
Dmitri Ovodok
d0a24894d2 Read/write beams without using IDs 2018-08-16 19:10:28 +03:00
Dmitri Ovodok
104898195b Read and write spanners using the connectors framework
Remove IDs for spanners
2018-08-16 19:10:28 +03:00
Dmitri Ovodok
55bef706b8 Add API for retrieving positions of elements in terms of fractions
Rename fpos -> rfrac
Merge Element::ftick with Element::afrac
2018-08-16 19:08:45 +03:00
Joachim Schmitz
632f830f5f Fix #275218: fix MSVC compiler warnings
* Warnings C4304, C4804 and C4838.
* Warnings C4065 and most C4702 (all but two).
* Warnings C4701.
* Warnings C4244.
* Warnings C4457.
* Warnings C4459.
* Some warnings C4456, due to nested `foreach` loops.
2018-08-14 10:03:49 +02:00
anatoly-os
43d253d251
Merge pull request #3823 from mattmcclinch/270433-remove-markings
fix #270433: Crash when pasting a note with an articulation if the final note is split between two measures
2018-08-14 09:40:41 +02:00
Andres Fernandez de Prado
33dff96a20 This commit contains changes required for MuseScore to compile under MSVC with no warnings.
This commit contains changes required for MuseScore to compile under MSVC with no warnings.

MuseScore is being compiled with the /W4 setting (warning level 4), which is similar to -wall -wextra on clang. This generates lots of warnings on MSVC, mainly for non-standard constructs and for constructs which might be bugs or might lead to bugs.

Most warnings are in the following categories:
- Name hiding: a variable hides a variable with the same name on a larger scope (or a field, or a function parameter). This can easily lead to bugs, and it is a best practice to avoid hiding variable names (see recommendation ES.12 in the C++ Core Guidelines by Stroustrop & Sutter (http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Res-reuse : ES.12: Do not reuse names in nested scopes)
- Narrowing conversion: a numeric conversion results in loss of significant digits (for example, double -> float). The general recommendation is to use a cast to indicate this is designed behaviour.
- Unreachable code: in several instances, there is unreachable code. The unreachable code is commented out.
- (Potentially) uninitialized local variable. Just initialized the vars.
- foreach(,) -> for(:): this does not generate a warning per-se (only a few of these generate warnings due to name hiding), but changed in keeping with "MuseScore Coding Rules" (https://musescore.org/en/handbook/musescore-coding-rules#Loops), which tells explicitly "Use C++11's "for" instead of Qt's "foreach":" ... "If you happen to be fixing some code and see a "foreach", please change that loop into a "for"."

Most changes are in the categories indicated above. The next listing shows detailed changes for files which are *not* of the aforementioned types.

- all.h: Disable warning C4127 (conditional expression is constant - generated in Qt header file qvector.h)
- awl/aslider.h: unreachable code.
- awl/knob.cpp: name hiding
- awl/mslider.cpp: name hiding
- awl/slider.cpp: name hiding
- bww2mxml/parser.cpp: name hiding
- effects/compressor/compressor.cpp: narrowing conversion
- effects/zita1/zitagui.cpp: name hiding
- fluid/fluid.cpp: foreach replacement. Name hiding.
- fluid/mod.cpp: name hiding.
- fluid/sfont.cpp: foreach replacement. Name hiding. Initialize vars.
- fluid/voice.cpp: Name hiding.
- libmscore/accidental.cpp: Name hiding.
- libmscore/ambitus.cpp: Initialize vars.
- libmscore/barline.cpp: Name hiding. Unreachable code.
- libmscore/beam.cpp: Name hiding.
- libmscore/chordrest.cpp: Unreachable code.
- libmscore/scorefile.cpp: Name hiding.
- manual/genManual.cpp: Name hiding. foreach replacement.
- midi/midifile.cpp: Name hiding. Unreachable code.
- omr/importpdf.cpp: Name hiding. foreach replacement.
- omr/omr.cpp: Name hiding. foreach replacement.
- omr/omrpage.cpp: Name hiding. foreach replacement.
- omr/omrview.cpp: Name hiding. foreach replacement.
- synthesizer/event.cpp: Unreachable code.
- zerberus\channel.cpp: Narrowing conversion.
- zerberus\instrument.cpp: Name hiding.
- zerberus\sfz.cpp: Name hiding.
- zerberus\voice.h: Suppress warning C4201: "nonstandard extension used: nameless struct/union"
- zerberus\zerberus.cpp: Name hiding. Unreferenced parameter.
- zerberus\zerberusgui.cpp: Name hiding.
2018-08-03 09:15:42 +02:00
ws
10ebbb9080 update text style implementation 2018-08-01 11:46:35 +02:00
Matt McClinch
db450fd34b fix #270433: Crash when pasting a note with an articulation if the final note is split between two measures 2018-07-20 11:03:35 -04:00
ws
982a1a6efd fix #265798 Lyrics text overlaps for non-first verse lines 2018-07-19 17:12:56 +02:00