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

File browser - Collapsing a directory may trigger a preview in other open directories. #5364

Closed
zonkmachine opened this issue Jan 3, 2020 · 6 comments · Fixed by #6060
Closed
Assignees
Milestone

Comments

@zonkmachine
Copy link
Member

zonkmachine commented Jan 3, 2020

In the file browser, when you collapse a directory and the mouse pointer in the updated tree is over a sample or a preset, this will trigger a preview. The mouse click event seem to be passed on.

I have replicated the issue on stable-1.1.3, stable-1.2 and current master.

Method to reproduce. Expand all the preset directories from AFP to ZynAddSubFX and then close them again from the bottom and up. This should trigger some random sounds.

@zonkmachine zonkmachine added the bug label Jan 3, 2020
@JohannesLorenz
Copy link
Contributor

I don't understand the reproducing. If I want to collapse a directory, I always do so by clicking on the directory, so in the updated tree, the pointer is still on that directory (which is now closed). So the pointer can not be over a sample or preset?

About milestoning: It occurs on 1.2 and does not sound hard to fix, so this should be milestoned 1.2?

@zonkmachine
Copy link
Member Author

I don't understand the reproducing.

I added a method to reproduce the issue in the first post

About milestoning: It occurs on 1.2 and does not sound hard to fix, so this should be milestoned 1.2?

If someone wants to fix this for 1.2 I think that's fine.

@PhysSong
Copy link
Member

Reproduced with a clean build:

  • Go to the preset tab and expand "TripleOscillator" and "Watsyn"
  • Scroll down to the very bottom
  • Collapse "Watsyn"
  • You'll get a preset being played

It seems like we check the item at the mouse pointer after QTreeWidget::mousePressEvent() collapses the tree. However, the relevant item is one at the cursor before calling QTreeWidget::mousePressEvent().

QTreeWidget::mousePressEvent(me);
// QTreeWidget handles right clicks for us, so we only care about left clicks
if(me->button() != Qt::LeftButton) { return; }
QTreeWidgetItem * i = itemAt(me->pos());

@ifndefJOSH
Copy link
Contributor

Hey, I'm new here, but I was also able to reproduce the issue. Would this be a good thing for me, a total newbie to LMMS development, to take on?

This was linked to pull requests Jun 18, 2021
@zonkmachine
Copy link
Member Author

@ifndefJOSH Thanks for fixing this!

@Spekular
Copy link
Member

Indeed, great work! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants