Moved the fix from 7f9f1df8eb to a more
appropriate place so QML palettes can also benefit from it.
Added a test which reproduces this crash without the fix.
* Rename palettedialogs.cpp/h to palettedialog.cpp/h to clarify the purpose of the file
* Made the changes similar to bf0dc85ee2
* Remove obsolete PaletteCellProperties declaration, remove the usage from the old Palette code
* Rename related *.ui file to clarify the meaning of the ui file
* Improve methods naming and parameters usage
Rename palette.ui to paletteProperties.ui to keep the purpose of the UI file
Introduce slots for each control within the palette properties dialog. Each slot remembers whether the value was changed and emits signal to apply changes to the model.
All changes are applied on fly.
If a user wants to close the dialog, the message box similar to closing a file with unsaved changes will appear.
The changes are reverted if user cancels the dialog without saving changes and the palette state won't be changed which prevents creating custom workspace if no changes are applied.
Remove "Show More Element" checkbox
Disable "Palette Properties" when a palette is not editable
Added new "makeReadable" function to replace Unicode characters with readable strings,
and called this where needed in the places where the screenreader text is assembled.
If the default layout of a palette element resulted in a boundary box with negative x & y coordinates for the top-left corner, the changed line of this commit would attempt to ensure that the entire element's pixelmap would be rendered in positive coordinate space only by offseting its position according to the top-left corner coordinates. Unfortunately, that code don't seem to work, since vertically-centered elements like hairpins (which have a negative y coordinate for the top of its boundary box) only displayed the elements bottom-half when dragged from palette.
This fix uses alternate code which I think more properly does what that line intended to do, using Qt's QPainter translate function instead of e->setPos() to compensate for layout's adjustment of the element's position.
- 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
Previously, if user was in edit mode (by double-clicking an element in score), then applying palette elements by double-clicking would be problematic. This would be because Palette::applyPaletteElement() doesn't perform score->startCmd() before applying the element nor a score->endCmd() after applying the element, because it assumes that the score is already in a startCmd.
Exiting edit mode fixes#280830 which was a crash when applying a time signature from palette while in editmode. And fixes another glitch where applying system text from palette while in edit mode.
Turns out that ScoreView::editMode() encompasses more than just plane element edit, so I'm also making sure not inside states for LYRICS_EDIT, HARMONY_FIGBASS_EDIT, and TEXT_EDIT, where it might make sense for user to apply a symbol from a palette by doubleclicking.
Added new tour message triggered when either dropping or double-clicking spanners from the palette.
Explains how to extend a spanner's range with Shift-Right/Left.
Explains how to add a new spanner across a pre-selected range.
Copying of some selection information is still needed when selection
state can be modified. This commit reverts back to copying Selection
object in such cases.