Skip to content

Fix properties panel not updating when pasting #28105

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

juli27
Copy link
Contributor

@juli27 juli27 commented May 21, 2025

Resolves: #27846

The InspectorListModel listens for selection changes on NotationInteraction to update the displayed elements. NotationInteraction notifies selection listeners in apply() (indirectly via the undo stack). However, since apply() is called before the selection is updated in pasteSelection(), no selection update notification was sent.

  • I signed the CLA
  • The title of the PR describes the problem it addresses
  • Each commit's message describes its purpose and effects, and references the issue it resolves
  • If changes are extensive, there is a sequence of easily reviewable commits
  • The code in the PR follows the coding rules
  • There are no unnecessary changes
  • The code compiles and runs on my machine, preferably after each commit individually
  • I created a unit test or vtest to verify the changes I made (if applicable)

juli27 added 2 commits May 26, 2025 12:41
Resolves: musescore#27846

The InspectorListModel listens for selection changes on
NotationInteraction to update the displayed elements.
NotationInteraction notifies selection listeners in apply() (indirectly
via the undo stack). However, since apply() is called before the
selection is updated in pasteSelection(), no selection update
notification was sent.
selectAndStartEditIfNeeded() now notifies listeners, if needed.
@juli27 juli27 force-pushed the fixPropertiesUpdateOnPaste branch from bfc42cd to febcc95 Compare May 26, 2025 11:03
@juli27
Copy link
Contributor Author

juli27 commented May 26, 2025

I changed it to the suggested solution and also took the liberty to cleanup selectAndStartEditIfNeeded() a bit.

@juli27 juli27 requested a review from RomanPudashkin May 26, 2025 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The "properties" panel is not updated when a single element is pasted
2 participants