Skip to content

Update Piano Roll Knife Tool#8000

Open
FrisbyNinja wants to merge 7 commits intoLMMS:masterfrom
FrisbyNinja:master
Open

Update Piano Roll Knife Tool#8000
FrisbyNinja wants to merge 7 commits intoLMMS:masterfrom
FrisbyNinja:master

Conversation

@FrisbyNinja
Copy link

@FrisbyNinja FrisbyNinja commented Jul 10, 2025

This pull request attempts to resolve #7814 by moving the knife tool to the piano roll toolbar, and adding a hint for its usage.
The changes are :

  • Set a hint to display on calling PianoRoll:setKnifeAction.
  • Added an extra if statement to PianoRoll:setEditMode, which, if the selected mode is EditMode::Knife, will call the setKnifeAction function.
    I'm not too pleased with this to be honest, but it works alright and makes other code cleaner.

NOTE : I'm not sure whether it would be a good idea to only show the hint once - If the user misses it, that could be problematic. Therefore, I've left it as displaying every time for now. Maybe a 'Don't show again' button would solve this ? I don't know how I would program that though \(°v°)/

Copy link
Contributor

@JohannesLorenz JohannesLorenz left a comment

Choose a reason for hiding this comment

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

Checked:

  • Style
  • Functionality

Open points:

  • Testing
  • Checking if the feature is wanted

@FrisbyNinja
Copy link
Author

Ah yes, I apologize for that. I changed it on my PC when I realized the errors, but forgot to push. :/

@RainbowShatter
Copy link

Seems to be a great idea, but what about themes? Maybe that's the least of all problems, since it is just an extra button, but, who knows?

@JMii63
Copy link

JMii63 commented Jul 12, 2025

Seems to be a great idea, but what about themes? Maybe that's the least of all problems, since it is just an extra button, but, who knows?

Sounds great, I would love my LMMS in purple, but if you want to talk about that, maybe open up a discussion on the forums or an “enhancement” tag issue on Github.

@Monospace-V
Copy link
Member

Seems to be a great idea, but what about themes? Maybe that's the least of all problems, since it is just an extra button, but, who knows?

Can you clarify what you are concerned about?
Themes from older versions of LMMS cannot be used with newer versions anyway. Unless a theme is maintained to be constantly updated with each change in the program UI, it is more convenient to create themes at major releases.

What scenario are you concerned about specifically?

@allejok96
Copy link
Contributor

This shouldn't affect custom themes. The icon is unchanged, and it is just added to the edit mode button group, so if that's themed, the knife button will also be themed.

@allejok96
Copy link
Contributor

See also my combo button idea in #6497. If you don't want to copy pasta that, I'm fine with merging this as-is for the moment.

QAction* eraseAction = editModeGroup->addAction( embed::getIconPixmap( "edit_erase" ), tr("Erase mode (Shift+E)" ) );
QAction* selectAction = editModeGroup->addAction( embed::getIconPixmap( "edit_select" ), tr( "Select mode (Shift+S)" ) );
QAction* pitchBendAction = editModeGroup->addAction( embed::getIconPixmap( "automation" ), tr("Pitch Bend mode (Shift+T)" ) );
QAction* knifeAction = editModeGroup->addAction(embed::getIconPixmap("edit_knife"), tr("Knife"));
Copy link
Contributor

Choose a reason for hiding this comment

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

The others have written out the shortcut explicitly in their names, it might be necessary for these kinds of buttons, I haven't actually tested the code.

Copy link
Author

Choose a reason for hiding this comment

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

I didn't change that bit of code ; The tr("Knife") is exactly the same as it was originally.
I could modify it if that would be best, but I'm not sure whether people think that would overstep the scope set by the issue...

@allejok96
Copy link
Contributor

Sorry for spamming, just wanted to say this could perhaps be added to #7953 or the other way around

@FrisbyNinja
Copy link
Author

I'd be willing to add into the other PR ; See my message there.

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.

Fix/Improve PianoRoll Knife Tool UI

6 participants