make right click on CAN frames view grid work

This commit is contained in:
Leopixelo
2026-06-08 15:10:57 +02:00
parent 2682e7c84d
commit 401c57b412
+3 -2
View File
@@ -48,6 +48,7 @@ MainWindow::MainWindow(QWidget *parent) :
proxyModel->setSourceModel(model);
ui->canFramesView->setModel(proxyModel);
ui->canFramesView->setSelectionMode(QAbstractItemView::NoSelection);
settingsDialog = new MainSettingsDialog(); //instantiate the settings dialog so it can initialize settings if this is the first run or the config file was deleted.
settingsDialog->updateSettings(); //write out all the settings. If this is the first run it'll write defaults out.
@@ -728,8 +729,8 @@ void MainWindow::collapseAllRows()
void MainWindow::gridClicked(QModelIndex idx)
{
// do not expand or collapse row if a modifier key is pressed to be able to use the right click menu
if (QApplication::keyboardModifiers() != Qt::NoModifier) {
// do not expand or collapse row if press was a right mouse button press to be able to use the right click menu
if (QApplication::mouseButtons() & Qt::RightButton) {
return;
}
//qDebug() << "Grid Clicked";