88333b0f47
The default behavior of QListWidget is to allow double clicks of any mouse button, but in certain situations/usage cases this can cause undesirable results. As an example: when double-clicking with the right mouse button on an item in the sources list box, it will open up both the properties window and the context menu. Not pretty at all. This subclass filters out double clicks for any mouse button other than the left mouse button to fix this issue.
9 lines
212 B
C++
9 lines
212 B
C++
#include <QMouseEvent>
|
|
#include "source-list-widget.hpp"
|
|
|
|
void SourceListWidget::mouseDoubleClickEvent(QMouseEvent *event)
|
|
{
|
|
if (event->button() == Qt::LeftButton)
|
|
QListWidget::mouseDoubleClickEvent(event);
|
|
}
|