Commit graph

24 commits

Author SHA1 Message Date
Dmitri Ovodok
907a4dcc31 fix #296426: fix not linking multiple elements at the same tick in MM rests on score loading
The issue has two parts:

1) If a linked element belongs not to the first MM rest measure (e.g.
a BarLine), <linked> and <linkedMain> tags may have been written out
of a proper order.
2) If several links bind pairs of elements in the same score at the
same tick, these linkes may have been not established properly on
score loading.

Both issues needs to be fixed to fix linking of elements in the case
described in the issue (MM rests split by a barline with text elements
attached), so both fixes are included to this commit.
2019-11-03 14:20:13 +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
anatoly-os
6d70cc9a9a
Merge pull request #4381 from dmitrio95/276235-2.X-system-staff-text-2
fix #276235: make it possible to enable readahead for XmlReader
2018-12-12 21:05:08 +02:00
Dmitri Ovodok
3a10013012 fix #276235: make it possible to enable readahead for XmlReader
Also actually use that possibility for correct importing of 2.X
system/staff text for both compressed and uncompressed files.
2018-12-12 18:29:53 +02:00
Dmitri Ovodok
26057b6c94 Remove unused code from XmlReader and XmlWriter
Most of that code became unused after the summer's fileformat
changes, some code got obsolete earlier.
2018-12-12 17:35:24 +02:00
ws
5e1a949b0b fix #279343 Adding bracket in a system doesn't expand in other systems 2018-12-07 15:06:15 +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
anatoly-os
bf508b9ad8
Merge pull request #3562 from mattmcclinch/add-missing-elements
fix #270496: Add missing elements to incomplete tuplets when reading …
2018-11-14 14:41:36 +02:00
alexandr
22e71db6ae fix #275942: Crash while open score in debug mode of MS
Error consist of removing ConnectorInfoReader which lead to utilize already deleted pointer
2018-09-07 14:15:33 +02:00
Dmitri Ovodok
41366f5a5e Avoid using linked IDs (<lid>) when writing linked elements
This commit includes also the following changes needed for correct
work of the changed links reading code:
- Correct current reading position when reading multimeasure rests
- Assign track number for Fingering while reading MSCX
2018-08-16 19:10:29 +03:00
Dmitri Ovodok
2c28195c1c Add a framework to read/write connectors using relative positions instead of IDs
Try to reconnect broken connectors while reading MSCX files
2018-08-16 19:10:28 +03:00
Dmitri Ovodok
9bb7666779 Use a universal <location> tag to denote various position shifts 2018-08-16 19:09:58 +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
ws
10ebbb9080 update text style implementation 2018-08-01 11:46:35 +02:00
ws
ba8039e9bf fix #228366 Self-defined text styles lead to crash 2018-06-11 14:16:27 +02:00
ws
d0117b1459 fix #272022 Backward compatibility of previous versions files 2018-05-04 14:39:14 +02:00
Matt McClinch
397b5989b9 fix #270496: Add missing elements to incomplete tuplets when reading from a file 2018-03-22 14:24:45 -04:00
Werner Schweer
068ad1436f fix regression layouting text in frames 2017-11-20 14:47:03 +01:00
Werner Schweer
5102085280 small fixes for 2.x compatibility to make all vtests readable 2017-10-12 11:10:30 +02:00
Werner Schweer
53c3d614cf reenable 1.x compatibility code 2017-08-16 16:59:04 +02:00
AntonioBL
57f2791c44 fix tuplet duration and baselength when importing old files 2016-12-19 14:11:13 +01:00
Werner Schweer
c5f46bb208 rename Xml() -> XmlWriter() 2016-11-19 11:51:21 +01:00