Selects plot on right-click as well

This commit is contained in:
Magne Sjaastad
2025-07-23 10:34:27 +02:00
parent 86d60672ab
commit 054001cef4
@@ -570,9 +570,10 @@ bool RiuQwtPlotWidget::eventFilter( QObject* watched, QEvent* event )
return true;
}
if ( mouseEvent->type() == QMouseEvent::MouseButtonPress && ( mouseEvent->button() == Qt::LeftButton ) && m_plotDefinition )
if ( ( mouseEvent->type() == QMouseEvent::MouseButtonPress ) &&
( mouseEvent->button() == Qt::LeftButton || mouseEvent->button() == Qt::RightButton ) && m_plotDefinition )
{
// Select the plot clicked at in the Project Tree
// Select the plot clicked at in the Project Tree for both left and right mouse button clicks
RiuPlotMainWindowTools::selectAsCurrentItem( m_plotDefinition );
}