Skip to content

don't allow dragging TCOs in BBEditor#3832

Merged
Umcaruje merged 3 commits into
LMMS:masterfrom
BaraMGB:bbtrackdragbug
Oct 2, 2017
Merged

don't allow dragging TCOs in BBEditor#3832
Umcaruje merged 3 commits into
LMMS:masterfrom
BaraMGB:bbtrackdragbug

Conversation

@BaraMGB

@BaraMGB BaraMGB commented Sep 28, 2017

Copy link
Copy Markdown
Contributor

fixes #3822

@lukas-w

lukas-w commented Sep 28, 2017

Copy link
Copy Markdown
Member

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

BaraMGB commented Sep 28, 2017

Copy link
Copy Markdown
Contributor Author

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

tresf commented Sep 28, 2017

Copy link
Copy Markdown
Member

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

@lukas-w

lukas-w commented Sep 28, 2017

Copy link
Copy Markdown
Member

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

@BaraMGB

BaraMGB commented Sep 30, 2017

Copy link
Copy Markdown
Contributor Author

Sometimes it's easier than imagined. 🙄

Comment thread src/core/Track.cpp Outdated

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

Copy link
Copy Markdown
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
Copy Markdown
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.

@Umcaruje Umcaruje Sep 30, 2017

Copy link
Copy Markdown
Member

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
Copy Markdown
Member

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

@Umcaruje Umcaruje left a comment

Copy link
Copy Markdown
Member

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