Commit graph

163 commits

Author SHA1 Message Date
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
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
83fe78e58a fix #296171: fix triggerLayoutAll() for spanners
Fixup for 99c7b0d746
triggerLayout() and triggerLayoutAll() implementations in Element
have an optimization that allows to avoid triggering layout for
elements not yet added to a score by checking the element's parent.
This optimization is not suitable for spanners since they don't have
a parent even when added to a score. This commit adds a missing
implementation of Spanner::triggerLayoutAll() that takes this into
account.
2019-10-28 00:08:45 +02:00
Dmitri Ovodok
99c7b0d746 Add more information to setLayout() 2019-10-25 16:18:41 +02: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
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
d1b2714fac fix #291491: tuplet autoplace issues 2019-07-01 16:41:34 -06:00
Marc Sabatella
0be20afaf9 fix #289211: bad layout of lyrics dashes at end of system 2019-05-20 13:16:17 -06:00
Marc Sabatella
a27bc1f2f0 manage minDistance when moving away from staff 2019-05-14 17:32:34 -06:00
Marc Sabatella
31d91e32d2 add missing line types (borrowing code from PR 4894) 2019-05-09 22:46:59 -06:00
Marc Sabatella
89aa620352 hairpins + spanner staff detection + collect_artifacts 2019-05-09 22:46:59 -06:00
Marc Sabatella
ea2bc3d85a add spanners except hairpins, also fix fingerings 2019-05-09 22:46:59 -06:00
Marc Sabatella
cd8384f595 more refactoring; spanners next... 2019-05-09 22:46:59 -06:00
Marc Sabatella
cf52824b67 remove ABS_OFFSET property + collect_artifacts 2019-05-09 22:46:58 -06:00
Marc Sabatella
77f908bc58 allow autoplaced elements to cross into skyline 2019-05-09 22:46:58 -06:00
Marc Sabatella
6b7f33ec64 fix #278999, fix #288474: autoplace customization 2019-05-01 07:52:11 -06:00
anatoly-os
d11463de18
Merge pull request #4927 from dmitrio95/287806-endCR-track2-crash
fix #287806: fix a crash in Spanner::endCR() on unassigned track2
2019-05-01 14:41:13 +02:00
Joachim Schmitz
5c414e6271 fix MSVC and MinGW compiler warnings 2019-04-27 21:08:16 +02:00
Marc Sabatella
e6743f9f55 fix #282099: backwards melisma with overlapping voices 2019-04-22 12:04:28 -06:00
Dmitri Ovodok
697668e189 fix #287806: fix a crash in Spanner::endCR() on unassigned track2 2019-04-16 11:48:16 +03:00
Marc Sabatella
ec6f167f0b fix #286645: scale elements 2019-04-11 06:36:32 -06:00
Dmitri Ovodok
c789322faa Allow copy-pasting hairpins and hairpin+dynamics combinations 2019-03-27 10:24:08 +02:00
ws
9efd301242 Add changes from mattmcclinch to fix regression tests for musicxml and gtp import and scripting. 2019-02-18 11:48:24 +01: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
Matt McClinch
6bcc426134 fix #283834: Setting pedal and (de)crescendo lines to invisible doesn't work in PDF export and uploading 2019-02-09 13:07:52 -05:00
Dmitri Ovodok
5c33610fcc fix #280668: correct unmanaged spanners handling on time delete
Also don't manually clear systems list from instrument dialog, this
produces crashes too.
2018-12-26 19:14:14 +03:00
anatoly-os
b487a1b187
Merge pull request #4397 from dmitrio95/279509-spannersegment-tracks
fix #279509: always set correct track for spanner segments
2018-12-18 14:48:01 +02:00
MarcSabatella
772d299117 don't autoplace notelines 2018-12-16 20:59:35 -07:00
Dmitri Ovodok
705a94ad7a fix #279509: always set correct track for spanner segments 2018-12-14 16:08:35 +02:00
Joachim Schmitz
88d37365a6 fix compiler warnings, seen in MinGW and MSVC 2018-12-12 14:03:43 +01:00
Dmitri Ovodok
38bb6adfd6 Improve handling spanners writing in MM rests
This prevents incorrect writing of hairpins if they happen to be
inside MM rest range.
2018-12-07 13:28:35 +02:00
anatoly-os
39501b5adf
Merge pull request #4278 from dmitrio95/fix-bad-memory-access
Fix some cases of bad memory access
2018-12-05 22:22:21 +02:00
ws
a5381618fb fix #278916 Numbers only option has no effect on ottava display 2018-12-05 15:17:48 +01:00
Dmitri Ovodok
76a22bd831 Fix freed memory reading when removing connectors, use unique_ptr for connectors management
Reading of freed memory occurred in ConnectorInfoReader::operator=
(via a connector() call) when removing the connector info from
connector info list. The previous implementation would also work
incorrectly in case of replacing QList to any vector container.
2018-12-02 01:38:46 +02:00
Dmitri Ovodok
8e2ad3b40d Record placement related properties when autoplacement gets switched on 2018-11-26 01:59:12 +02:00
Dmitri Ovodok
f42943e90b fix #278722: do not delete spanner segments but reuse them 2018-11-26 01:59:02 +02:00
ws
5f4482d7c8 fix: save manual editing of slurs 2018-11-07 10:46:28 +01:00
ws
3fdfab33f4 fix #277717 Adding hairpins in continuous view leads to crash 2018-11-05 18:51:35 +01:00
ws
e122462931 fix #277746 hairpins can't get moved above staff anymore 2018-11-05 11:49:28 +01:00
Dmitri Ovodok
b5e2514519 Add properties used in <location> tag to the common properties system 2018-10-29 16:30:19 +02: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
ws
96af32eee7 fix regressions: layout of misc. elements 2018-10-25 15:44:21 +02:00
ws
fc927fa53e fix regression: fermata position 2018-10-22 16:16:01 +02:00
ws
d77183b3bb refactoring of Element::userOff and TextBase::offset 2018-10-18 11:56:23 +02:00
ws
58fc85be80 fix #275385 line collides a tie 2018-09-27 16:28:25 +02:00
alexandr
a5acf08eb3 fix #275361: Hidden dynamic symbols become visible 2.X->3.0
Error was that we need always call element::layout() method. Otherwise position of elements are (0.0 0.0). And painter doesn't draw elements with this position.
And now layout() is called for both visible and invisible elements, but invisible ones don't participate in autoplacement operations, so there is neither performance impact nor invisible elements autoplacement.
This leads to invisible elements collision if you switch visibility, but it is expected I believe, since we position elements for printing, but invisible elements are for playback.
2018-09-19 11:51:38 +02:00
ws
17a180baea cleanups for spanner segment autoplace 2018-09-12 09:24:02 +02:00
ws
b232149321 remove measure staff shapes, replace with skyline 2018-09-11 16:30:47 +02: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