Skip to content
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

fix #16077 part 1: Double click an instrument name to open the corresponding menu #5886

Merged
merged 1 commit into from
Apr 28, 2020

Conversation

SKefalidis
Copy link
Contributor

Resolves: https://musescore.org/en/node/16077

When the double-click event is created, the program checks if the user double-clicked on an instrument-name and opens the 'Edit Staff/Part Properties' menu if that is the case.

This provides one part of the requested functionality (the other, is to add the same ability for footers, but this should be another PR).

  • I signed CLA
  • I made sure the code in the PR follows the coding rules
  • I made sure the code compiles on my machine
  • I made sure there are no unnecessary changes in the code
  • I made sure the title of the PR reflects the core meaning of the issue you are solving
  • I made sure the commit message(s) contain a description and answer the question "Why do those changes fix that particular issue?" or "Why are those changes really necessary as improvements?"
  • I made sure the commit message title starts with "fix #424242:" if there is a related issue
  • [n\a] I created the test (mtest, vtest, script test) to verify the changes I made

@Jojo-Schmitz
Copy link
Contributor

Opening the staff properties dialog is not exactly the selected as allowing to edit the instrument name in place though.
As that had been disabled back in the day as it caused issues, doing it this way now seems the safer way though

@SKefalidis
Copy link
Contributor Author

SKefalidis commented Mar 29, 2020

From what I understand the user wants the ability to double click to open the corresponding menus in both cases. He moves on to say that it would be ideal if he could edit-in-place but this is not the main focus of the issue (as its title suggests).

Giving the ability to edit in place would be truly ideal, but it would probably require reworking the entire Instrument-system-iname chain of interactions.

@Jojo-Schmitz
Copy link
Contributor

No objection from me, just pointing out the shortcomings of this solution.

@SKefalidis
Copy link
Contributor Author

Fixed formatting and added a return statement.

@MarcSabatella
Copy link
Contributor

I like the idea a lot. Any possibility the same could be done for header/footer? I'm not as sure it's possible, at least, not as simply - I kind of doubt the header/footer register here. But worth a shot.

@SKefalidis
Copy link
Contributor Author

@MarcSabatella I am actually finishing the PR for that right now. :-)

return;
else if (!clickedElement->isEditable()) {
Copy link
Contributor

@igorkorsukov igorkorsukov Apr 17, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there is no need for else

if (!clickedElement)
    return;

if (!clickedElement->isEditable()) {
    ...
    return
}

...



@SKefalidis
Copy link
Contributor Author

SKefalidis commented Apr 17, 2020

I made the changes which were suggested.

@anatoly-os anatoly-os merged commit 17deeb5 into musescore:master Apr 28, 2020
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.

6 participants