Commit graph

255 commits

Author SHA1 Message Date
Igor Korsukov
11f7060e2d fixed issues from PVS-Studio report (step2) 2020-03-20 16:52:52 +02: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
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
pereverzev_v
6b7e2d25a2 Explicitly initialized pointers to neighbour segments 2019-12-24 14:20:36 +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
99c7b0d746 Add more information to setLayout() 2019-10-25 16:18:41 +02: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
Marc Sabatella
9149511f19 fix #294121: navigation skips annotations entered out of order
Annotations are appended to the annotation list as they are entered.
This means they won't necessarily be sorted by track,
if you enter them onto staves in any order but top down.
The result is the navitgation code skips all annotations for a staff
after the first annotation it encounters on a different staff.

This commit fixes the issue by continuing to loop through the annotations,
looking for more on the same staff.

anatoly-os: rewrite the improvement from #5308 using `find_if`

anatoly-os: Did refactoring using `find_if` to make the code cleaner. Initial idea and implementation are authored by @MarcSabatella.
2019-10-02 15:23:01 +02:00
Marc Sabatella
6c51400d46 fix #295106: crash on next element
There are a number of cases where next element ended up hitting unexpected code paths.
Mostly these involve cases of elements being attached somewhere pther than expected:
symbols attached to rests or to other symbols rather than to notes,
chord symbols attached to fret diagrams.
This change addresses these cases in a few different ways:
1) for symbols to attached to other symbols, or chord symbols attached to fret diagrams,
srt the track correctly (it was -1, causing the  the code to not be able to find a next element).
2) for symbols attached to rests, be sure to handle that case in Score::nextElement(),
and also make sure that Segment::nextElement() and Segment::prevElement()
don't assume these elements actually have the segment as parent,
but instead check for that and move on if not.
2019-09-30 21:28:06 -06: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
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
Marc Sabatella
2f2aa3c731 fix #294485: don't wrap to begin/end on next/previous element
Blind users find it disorienting for the previous element command to wrap to the end,
or for next element to wrap back to the beginning.
Besides, no other navigation commands work that way.
This commit stops that behavior by simply swapping the calls
to Score::lastElement() and Score::firstElement() in the places where this wrapping occurs.
That is, if previous-element finds no previous element,
we return the first element.
2019-09-17 13:39:52 -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
ceaea1f149 fix #292510, fix #292928: navigation and screenreader support for frames
Added code to read the text within frames in accessibleExtraInfo(),
but also fixed the navigation to check for a frame
before moving to the next/previous measure.
Because frames will generally have a track of -1,
I also needed to take advantage of the tracking of the current track from a previous commit
so that nagivation continues on the correct track after passing through a frame.
I also needed to be careful to handle the -1.
2019-09-17 13:33:23 +02:00
anatoly-os
8b94d49e82
Merge pull request #5090 from MarcSabatella/290061-header-to-clef
fix #290061: no space between header and clef change
2019-08-30 20:37:56 +02:00
Marc Sabatella
595be22c0c fix #282091: navigation with multiple voices + collect_artifacts
The navigation previously had special cases for accidentals and articulations
to bump up to the parent before proceeding, but this ignored fingerings.
The fix here generalizes the test to catch other elements with notes or rests as parents.
Also, since fermatas are now segment elements rather than articulations,
that test is moved to be with the other segment elements.
2019-08-17 10:44:53 +02:00
Matt McClinch
cc885c15ae fix #292851: Note still played after having been deleted. 2019-08-03 09:54:24 -04:00
Joachim Schmitz
bf83bdccad fix #289672, fix #289957, fix #272546 and more: fix some strings
* Fix #289672: Reset '$STRING' value strings reference non-existent $STRING
* Fix #289957: wrong string in Advanced palette results in it not getting translated (ommission from #5016)
* Fix #272546: Baritone Oboe should be named Bass Oboe in English (see also #4474),
  "Hautbois Baryton" in French, "Bariton Oboe" in German, "Oboe Bajo" in Spanish.

Plus:

* Add (back) units for sp and pt
* Clarify transposition settings in staff properties dialog
* Fix a reset button's accessibilty info to match the label
* Quote buttons/keys in tours
* Barré to Barre
* Fix capitalization (see also #5102)
* Don't translate debugger (which is not visible in RELEASE mode)
* Sforzato to Accent in shortcuts (see https://musescore.org/en/node/290297)
* Some whitespace and punctuation fixes
* Fixing some error messages
* Removing a redundant word
* Disambiguations for various occurences of "None" which may require different translatations.
* Simplify some strings with URLs for translators
* Don't translate scroipt recorder (which is not visible in RELEASE mode)
2019-07-11 13:47:42 +02:00
Dmitri Ovodok
f2634a03c7 Add a missing staff number to track conversion in Segment::getElement 2019-06-22 11:38:11 +02:00
Dmitri Ovodok
f1233b796f
Merge pull request #5081 from MarcSabatella/289892-mmrest-system
fixes for layout of first measure of system, first system of page
2019-06-15 22:31:20 +02:00
Dmitri Ovodok
814620476b Add sticking feature 2019-06-15 13:52:28 +02:00
Marc Sabatella
feffd0f5f7 fix #290061: no space betwene header and clef change 2019-05-31 19:54:01 -06:00
Marc Sabatella
7da9308b2e fix #289982: notes can overlap key signature 2019-05-30 12:51:09 -06:00
anatoly-os
13b568c6d7
Merge pull request #4922 from MarcSabatella/repeat-clef
fix #285605, fix #228531, fix #77396: repeat barline, then clef
2019-05-21 21:39:57 +02:00
anatoly-os
624b90d8e0
Merge pull request #5020 from MarcSabatella/clef-space
fix #285535, fix #284613: spacing of mid-measure clefs
2019-05-21 20:53:06 +02:00
anatoly-os
cef6c49f9f
Merge pull request #4965 from MarcSabatella/small-barline
fix #277039: barline alignment
2019-05-20 16:19:30 +03:00
anatoly-os
35c06f2f57
Merge pull request #4844 from peterhieuvu/save-segment-stem
Save segment and stem properties correctly
2019-05-20 12:06:55 +03:00
Marc Sabatella
55cb6c5b9a fix #285535, fix #284613: spacing of mid-measure clefs 2019-05-16 13:48:11 -06:00
Marc Sabatella
4f44158d46 fix #277039: barline alignment 2019-05-13 06:55:43 -06:00
Marc Sabatella
6b7f33ec64 fix #278999, fix #288474: autoplace customization 2019-05-01 07:52:11 -06:00
Marc Sabatella
691b83c03e fix #285605, fix #228531, fix #77396: repeat barline, then clef 2019-04-15 07:35:34 -06:00
Marc Sabatella
bddbad2618 fix #284440: scale spatium-dependent properties 2019-04-11 06:36:32 -06:00
Peter Hieu Vu
d6780eb0fa fix #279245: save stacking order and autoplace for stems and system dividers 2019-03-30 12:49:46 -07:00
Peter Hieu Vu
1dac2a7dba fix #139846: save leading space adjustments 2019-03-30 10:14:52 -07:00
Dmitri Ovodok
58467b6eeb fix annotations memory leak 2019-03-19 14:47:47 +02:00
Marc Sabatella
b4019070ee fix #279259: chord symbol spacing fixes 2019-03-15 10:51:32 -06:00
Marc Sabatella
c2dfff900c fix #281024: invisible staves affect spacing 2019-03-07 14:05:01 -07:00
Fengshi
82b16643cb fix #280878: adding vector empty check in function Ms::Segment::nextAnnotation(Ms::Element * e).
Fixed issue #280878 by adding vector empty check in function Ms::Segment::nextAnnotation(Ms::Element * e).
2019-03-02 22:21:04 +08: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
Marc Sabatella
e65fcde888 fix #283832: distance from barline to keysig 2019-02-09 07:47:26 -07:00
Dmitri Ovodok
ea81a9338c Add a new QML plugins API
- Move Qml plugin engine out of libmscore
 - Add Pid::TICK handling to Element class
 - Make tick QML property correspond to absolute tick in all contexts
     That is a temporary solution though, a proper solution would
     require revising Pid::TICK handling
 - Move plugins API to api directory
 - Rename ElementW -> Element (PluginAPI namespace)
 - Remove Qt meta-object macros from Score in libmscore
 - Remove string-based access to properties from QML
 - Remove unused functions from Note
 - Rename QML properties names to camel case
     Two reasons:
       - They were named so in MuseScore 2.X.
       - Using underscored_names is less consistent with MuseScore
         coding style.
2019-01-24 17:36:05 +03:00
Dmitri Ovodok
73bdf0c3ad fix #151256, part 2: don't allow lyrics cross barlines
Melisma are not affected by this patch and still can cross barlines

Shapes change hack makes horizontal spacing apply only for the
specified spacing type even in case of zero-width shape. That way
chord symbols can cross barlines again.
2019-01-10 11:00:20 +03:00
Dmitri Ovodok
769c966c45 fix #278986: ensure correct horizontal spacing for barlines 2018-12-24 12:00:58 +03:00
ws
2ce05d0c11 preparations for using fractions instead of ticks in Segment() 2018-12-21 11:40:19 +01:00
Dmitri Ovodok
72af67444a fix #280140: fix distance between notes and start repeat barlines 2018-12-19 17:03:30 +02:00
MarcSabatella
92b3589bca Skip disabled segments in accessibility navigation 2018-12-16 15:14:33 +02:00
Dmitri Ovodok
c5c47107e6 Add "enabled" versions for Segment::prev1, prev1MM and next1MM 2018-12-16 15:09:44 +02:00
Dmitri Ovodok
d58d071a15 fix #279484: fix incorrect segment ticks on time delete 2018-12-06 15:02:58 +02:00
Dmitri Ovodok
c333c71b62 fix #277358: do not include figured bass in segments shape
This helps to prevent expanding figured bass size on relayout,
which is described in the issue.
2018-11-28 16:48:58 +02: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