Core: Only act on left click on examples and the like

Change-Id: I4f676743851136d42ca87aa3f3bc49769ba86d56
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Christian Stenger
2020-04-30 15:08:56 +02:00
parent 984dedc3a2
commit 0f502b0516

View File

@@ -603,6 +603,10 @@ bool ListItemDelegate::editorEvent(QEvent *event, QAbstractItemModel *model,
if (!item) if (!item)
return false; return false;
auto mev = static_cast<QMouseEvent *>(event); auto mev = static_cast<QMouseEvent *>(event);
if (mev->button() != Qt::LeftButton) // do not react on right click
return false;
if (index.isValid()) { if (index.isValid()) {
const QPoint pos = mev->pos(); const QPoint pos = mev->pos();
if (pos.y() > option.rect.y() + GridProxyModel::TagsSeparatorY) { if (pos.y() > option.rect.y() + GridProxyModel::TagsSeparatorY) {