Skip to content

Commit

Permalink
Merge pull request #11579 from uklotzde/context-menu-accept
Browse files Browse the repository at this point in the history
Add missing QContextMenuEvent::accept() invocations
  • Loading branch information
Swiftb0y authored May 22, 2023
2 parents 5f5cd28 + d86653d commit 92d1457
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/widget/wlibrarysidebar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,12 @@ WLibrarySidebar::WLibrarySidebar(QWidget* parent)

void WLibrarySidebar::contextMenuEvent(QContextMenuEvent *event) {
//if (event->state() & Qt::RightButton) { //Dis shiz don werk on windowze
QModelIndex clickedItem = indexAt(event->pos());
emit rightClicked(event->globalPos(), clickedItem);
QModelIndex clickedIndex = indexAt(event->pos());
if (!clickedIndex.isValid()) {
return;
}
event->accept();
emit rightClicked(event->globalPos(), clickedIndex);
//}
}

Expand Down
1 change: 1 addition & 0 deletions src/widget/wtracktableviewheader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ WTrackTableViewHeader::WTrackTableViewHeader(Qt::Orientation orientation,
}

void WTrackTableViewHeader::contextMenuEvent(QContextMenuEvent* event) {
event->accept();
m_menu.popup(event->globalPos());
}

Expand Down

0 comments on commit 92d1457

Please sign in to comment.