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.
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.
- Remove disabled and largely outdated continuous view layout code
- Remove declarations of functions which have no definition
- Remove unused global libmscore variables
- Remove some excessive forward declarations
- 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
This commit adds:
- ScoreElement::propertyId for obtaining property ID by its XML name
within the context of the respective element
- ScoreElement::propertyUserValue to obtain values of the properties
in a human-readable representation
Element::pos() and Element::ipos() unclear and error prone semantic led to 382b7d79d8.
SpannerSegment::pos2() and SpannerSegment::ipos2() are not good as well.
I didn't apply renaming because active work is in progress.
Those changes include:
- Add a possibility to write comments to MSCX files
- Add Element::findMeasureBase and constant version of Element::findMeasure
- Store index of the currently read measure in XmlReader. Correct behaviour of MeasureBase::index.
- Minor spanners-related additions to elements creation and conversion