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

don't allow dragging TCOs in BBEditor #3832

Merged
merged 3 commits into from
Oct 2, 2017
Merged

Conversation

BaraMGB
Copy link
Contributor

@BaraMGB BaraMGB commented Sep 28, 2017

fixes #3822

@lukas-w
Copy link
Member

lukas-w commented Sep 28, 2017

For better modularity: Can you try implementing the fix in the affected subclass (BBTCOView?) instead of using dynamic_cast in the super class? I.e. override mousePressEvent in BBTCOView and stop the events from being propagated there.

@BaraMGB
Copy link
Contributor Author

BaraMGB commented Sep 28, 2017

I'm not sure. I looked into this. But a BBTCOView is this one:

bildschirmfoto von 2017-09-28 14-29-45

The issue appears with all TCOs in a BBTrackContainer.

@tresf
Copy link
Member

tresf commented Sep 28, 2017

I was under the impression fixedTCOs was the boolean flag that stored whether or not a pattern was resizable.

@lukas-w
Copy link
Member

lukas-w commented Sep 28, 2017

Didn't know about fixedTCOs, looks like this is what we need here. 👍

@BaraMGB
Copy link
Contributor Author

BaraMGB commented Sep 30, 2017

Sometimes it's easier than imagined. 🙄


BBTrackContainer * isbbEditor = dynamic_cast<BBTrackContainer*>( getTrackContentObject()->getTrack()->trackContainer() );
if( !isbbEditor && me->button() == Qt::LeftButton )
if( me->button() == Qt::LeftButton && fixedTCOs() == false )
Copy link
Member

Choose a reason for hiding this comment

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

You could just to !FixedTCOs() since it's a boolean

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wanted to be consist with the rest of the code. But if there are no objections I do it for the whole If statement.

Copy link
Member

@Umcaruje Umcaruje Sep 30, 2017

Choose a reason for hiding this comment

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

!FixedTCOs() makes more sense to me because I literally read it "If it's not a Fixed TCO"

@Umcaruje
Copy link
Member

Just tested this out, works well, fixes the bug 👍

Copy link
Member

@Umcaruje Umcaruje left a comment

Choose a reason for hiding this comment

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

Still works perfectly 👌

@Umcaruje Umcaruje merged commit 31d27d2 into LMMS:master Oct 2, 2017
sdasda7777 pushed a commit to sdasda7777/lmms that referenced this pull request Jun 28, 2022
* don't allow dragging TCOs in BBEditor

* change bbtrack detecting

* code improvements
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.

4 participants