1
0
mirror of https://github.com/clementine-player/Clementine synced 2024-12-15 10:48:33 +01:00

Show the analyzer popup menu on a left click as well as a right click

This commit is contained in:
David Sansome 2010-03-21 16:20:27 +00:00
parent a7596959eb
commit 2e1023457c
2 changed files with 5 additions and 4 deletions

View File

@ -2,7 +2,7 @@
#include "baranalyzer.h"
#include "blockanalyzer.h"
#include <QContextMenuEvent>
#include <QMouseEvent>
#include <QHBoxLayout>
#include <QSettings>
@ -34,7 +34,8 @@ AnalyzerContainer::AnalyzerContainer(QWidget *parent)
Load();
}
void AnalyzerContainer::contextMenuEvent(QContextMenuEvent* e) {
void AnalyzerContainer::mouseReleaseEvent(QMouseEvent* e) {
if (e->button() == Qt::LeftButton || e->button() == Qt::RightButton)
context_menu_->popup(e->globalPos());
}

View File

@ -19,7 +19,7 @@ public:
static const char* kSettingsGroup;
protected:
void contextMenuEvent(QContextMenuEvent *);
void mouseReleaseEvent(QMouseEvent *);
private slots:
void ChangeAnalyzer(int id);