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 for #1907 - inconsistent clamping behavior in automation editor #1910

Merged
merged 1 commit into from
Apr 1, 2015

Conversation

Wallacoloo
Copy link
Member

The safety check for x < 0 at the topmost level was mostly redundant. The check to make sure we don't move an automation point to some t < 0 is handled on line 640 instead, as well as line 894 for the case where m_editMode == SELECT.

This slightly changes behavior for deleting automation points as well. Previously, it had a similar inconsistency: you could delete points off to the right of the view, but not off to the left. Now you can delete points from both the left and right side.

I also fixed some inconsistent tab formatting.
#1907

@@ -699,12 +694,12 @@ void AutomationEditor::mouseMoveEvent(QMouseEvent * mouseEvent )
{
if( QApplication::overrideCursor() )
{
if( QApplication::overrideCursor()->shape() != Qt::SizeAllCursor )
if( QApplication::overrideCursor()->shape() != Qt::SizeAllCursor )
Copy link
Contributor

Choose a reason for hiding this comment

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

Would you mind to replace spaces with tabs? This seems to be convention on this project.

@tresf
Copy link
Member

tresf commented Mar 30, 2015

This looks good. Very small change too, which is nice! If @badosu or @curlymorphic have a chance to review this, please do. If not, it will be a while before I test this fix out myself.

@tresf
Copy link
Member

tresf commented Mar 30, 2015

Scratch that, @badosu is already reviewing this. 👍

@badosu
Copy link
Contributor

badosu commented Mar 30, 2015

@tresf It looks like the relevant change consist of only the 3 lines that were removed. A more thorough test is necessary to ensure that the removed check was not important for other code paths.

I'll take a look later.

@Wallacoloo
Copy link
Member Author

Oops! I forgot my editor was configured for spaces. Will revise that later today.

@badosu
Copy link
Contributor

badosu commented Mar 30, 2015

@Wallacoloo On your PR's description you refer to line 894 but you didn't change it, is this intended?

@tresf
Copy link
Member

tresf commented Mar 30, 2015

@badosu IIRC, he was talking about the lines which had redundant logic to what the removed lines did (I'd guess as a sanity reminder that he wasn't going to send negative values into the code).

@Wallacoloo
Copy link
Member Author

@tresf correct.
On Mar 30, 2015 3:55 PM, "Tres Finocchiaro" notifications@github.com
wrote:

@badosu https://github.com/badosu IIRC, he was talking about the lines
which had redundant logic to what the removed lines did (I'd guess as a
sanity reminder that he wasn't going to send negative values into the code).


Reply to this email directly or view it on GitHub
#1910 (comment).

@badosu
Copy link
Contributor

badosu commented Mar 31, 2015

@Wallacoloo I got what you mean now, good job! 👍

Gonna test again as soon as you push the style fix.

@Wallacoloo
Copy link
Member Author

@badosu All the code touched in this pull request shows up as using tabs for indentation on both Github and my editor (Sublime Text). Can you clarify what you mean about replacing the spaces with tabs?

@badosu
Copy link
Contributor

badosu commented Mar 31, 2015

@Wallacoloo If this is the case I am deeply sorry, I guess I am used to represent tabs in a different manner on my editor.

I'll test this PR tomorrow, thanks!

@badosu
Copy link
Contributor

badosu commented Apr 1, 2015

It works! 👍

@tresf
Copy link
Member

tresf commented Apr 1, 2015

@badosu, much obliged.

tresf added a commit that referenced this pull request Apr 1, 2015
Fix for #1907 - inconsistent clamping behavior in automation editor
@tresf tresf merged commit 77c6f5a into LMMS:master Apr 1, 2015
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.

3 participants