Skip to content

Conversation

@rolivav
Copy link

@rolivav rolivav commented Oct 6, 2021

Small feature to be able to close the tabs with the middle mouse button.
Li6wHUuZZT
It is just faster and I missed it.

{
d->saveDragStartMousePosition(internal::globalPositionOf(event));
d->startFloating(DraggingInactive);
if (event->button() == Qt::LeftButton) {
Copy link
Author

Choose a reason for hiding this comment

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

Double click would trigger while closing tabs very fast, I don't think it was intended to float with any button anyway.

if (CDockManager::testConfigFlag(CDockManager::MiddleMouseButtonClosesTab)){
// Only attempt to close if the mouse is still
// on top of the widget, to allow the user to cancel.
if (rect().contains(mapFromGlobal(QCursor::pos()))) {
Copy link
Author

Choose a reason for hiding this comment

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

Can't use underMouse() because the flag is not properly updated.

@rolivav rolivav force-pushed the ff/editor/dev/middle_mouse_button_close branch from 806f566 to 7e5fb9e Compare October 6, 2021 17:59
@githubuser0xFFFF
Copy link
Owner

Thank you

@githubuser0xFFFF githubuser0xFFFF merged commit 87b0596 into githubuser0xFFFF:master Oct 11, 2021
luelista pushed a commit to luelista/Qt-Advanced-Docking-System that referenced this pull request Mar 22, 2022
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.

2 participants