-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Automation Editor - delete automation point #3986
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
Automation Editor - delete automation point #3986
Conversation
|
Here is the essence of the changes from merged commits b68dc57, 3de3ea6 and this PR.
diff --git a/src/gui/editors/AutomationEditor.cpp b/src/gui/editors/AutomationEditor.cpp
index be3fb52..733cf28 100644
--- a/src/gui/editors/AutomationEditor.cpp
+++ b/src/gui/editors/AutomationEditor.cpp
@@ -517,16 +517,13 @@ void AutomationEditor::mousePressEvent( QMouseEvent* mouseEvent )
( it+1==time_map.end() ||
pos_ticks <= (it+1).key() ) &&
( pos_ticks<= it.key() + MidiTime::ticksPerTact() *4 / m_ppt ) &&
- level <= it.value() )
+ ( level == it.value() || mouseEvent->button() == Qt::RightButton ) )
{
break;
}I just rolled along with the original code. It feels a bit quirky but it works quite well actually. Trying to straighten it out a bit now but I doubt that I can do it. |
src/gui/editors/AutomationEditor.cpp
Outdated
| ( pos_ticks<= it.key() + MidiTime::ticksPerTact() *4 / m_ppt ) && | ||
| level == it.value() ) | ||
| ( level == it.value() || ( level != it.value() && | ||
| mouseEvent->button() == Qt::RightButton ) ) ) |
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.
It is equivalent to this:
( level == it.value() || mouseEvent->button() == Qt::RightButton ) )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.
Fixed.
2e91976 to
394912a
Compare
Fix regression from b68dc57 Let the right mouse button delete the automation point like before and add the space above it too.
394912a to
8bc7b01
Compare
|
The action on delete is not as spot on as for left click to move. It's the same as before though. Fixing this is going to be a lot messier. I think this is good for now. |
|
Merge? |
Fix regression from 7772edc Let the right mouse button delete the automation point like before and add the space above it too.
Fix regression from b68dc57 where deleting a point by right clicking without dragging is defunct.
I misunderstood the algorithm. The selection for add/delete was dual.
The latter appeared to me to be an obvious glitch so I pushed a fix to stable-1.2, messed up and was set for hours of fun with git and submodules. ☠️ The final bug fixed in this PR removes the dual action altogether.