-
Notifications
You must be signed in to change notification settings - Fork 3k
Fix #25070: support copy-paste in local time signatures #31314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
c60d633 to
ee7c790
Compare
cbjeukendrup
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks very much for this comprehensive PR!
|
|
||
| const bool canDrop = viewInteraction()->updateDropRange(ctx.logicClickPos); | ||
| m_view->asItem()->setCursor(canDrop ? Qt::DragCopyCursor : QCursor()); | ||
| m_view->asItem()->setCursor(canDrop ? Qt::DragCopyCursor : Qt::ForbiddenCursor); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know that the designers are not super fond of the "forbidden" cursor, so we might need to distinguish between "can't drop because you're not hovering any destination location" (which would show the default cursor) or "can't drop because there's something wrong with the hovered destination location" (which would show the "forbidden" cursor). But let's await testing.
(@avvvvve fyi)
| TimeSig* timeSig = measure->score()->staff(staffIdx)->timeSig(measure->tick()); | ||
| Fraction timeSigFrac = timeSig ? timeSig->sig() : measure->timesig(); | ||
| Fraction halfDivision = Fraction(1, 2 * timeSigFrac.denominator()); | ||
| if (timeSig) { | ||
| halfDivision /= timeSig->stretch(); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One issue with this is that once the time ticks are populated, we see the union of the time ticks for all the different local time signatures, even though many of them are unusable as drop targets in one time signature or the other.
It would be nicer if we had a way to filter which time ticks are visible when drag-dropping, but I'm not sure how best to accomplish that.
- rather than crashing
- and check it matches the destination
- new ones are equivalent, lower divisions value, arguably better than before
df39f81 to
20ae444
Compare
|
Addressed the code review feedback, rebased and cleaned up history a bit. |
Resolves: #16911
Resolves: #25070
Resolves: #31359
Support copy/paste in local time signatures, with the restriction that the source and destination ranges must all have the same time stretch ratio. Also enables features like "repeat selection", Alt+drag range copies, and explode which are built on copy/paste internally.
Tested:
Some other minor changes in this PR:
Fraction.