From 0fc8a5e2f22bab2541e24c7b8b245a1b043a9309 Mon Sep 17 00:00:00 2001 From: Damjan Adamic Date: Sun, 4 May 2014 18:08:55 +0200 Subject: [PATCH] Reenabled Ctrl+P shortcut for "print model" --- companion/src/mainwindow.cpp | 4 ++-- companion/src/modelslist.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/companion/src/mainwindow.cpp b/companion/src/mainwindow.cpp index 0308d0137..0644b339e 100644 --- a/companion/src/mainwindow.cpp +++ b/companion/src/mainwindow.cpp @@ -1573,7 +1573,7 @@ QAction * MainWindow::addAct(QString icon, QString sName, QString lName, QKeySeq if (!lName.isEmpty()) newAction->setStatusTip(lName); if (shortcut != 0) - newAction->setShortcuts(shortcut); + newAction->setShortcut(QKeySequence(shortcut)); if (slotObj == NULL) slotObj = this; connect(newAction, SIGNAL(triggered()), slotObj, slot); @@ -1653,7 +1653,7 @@ void MainWindow::createActions() // dutchLangAct = addAct( langAlignGroup, tr("Dutch"), tr("Use Dutch in menus"), SLOT(setNLLanguage())); aboutAct = addAct("information.png", tr("About..."), tr("Show the application's About box"), SLOT(about())); - printAct = addAct("print.png", tr("Print..."), tr("Print current model"), SLOT(print())); + printAct = addAct("print.png", tr("Print..."), tr("Print current model"), QKeySequence::Print, SLOT(print())); simulateAct = addAct("simulate.png", tr("Simulate..."), tr("Simulate current model"), SLOT(simulate())); loadbackupAct = addAct("open.png", tr("Load Backup..."), tr("Load backup from file"), SLOT(loadBackup())); logsAct = addAct("logs.png", tr("View Log File..."), tr("Open and view log file"), SLOT(logFile())); diff --git a/companion/src/modelslist.cpp b/companion/src/modelslist.cpp index 3d7fb8de1..26d99e9e7 100644 --- a/companion/src/modelslist.cpp +++ b/companion/src/modelslist.cpp @@ -97,7 +97,7 @@ void ModelsListWidget::ShowContextMenu(const QPoint& pos) contextMenu.addSeparator(); contextMenu.addAction(CompanionIcon("currentmodel.png"), tr("&Use as default"),this,SLOT(setdefault())); contextMenu.addSeparator(); - contextMenu.addAction(CompanionIcon("print.png"), tr("P&rint model"),this, SLOT(print()),tr("Alt+R")); + contextMenu.addAction(CompanionIcon("print.png"), tr("P&rint model"),this, SLOT(print()),QKeySequence(tr("Ctrl+P"))); contextMenu.addSeparator(); contextMenu.addAction(CompanionIcon("simulate.png"), tr("&Simulate model"),this, SLOT(simulate()),tr("Alt+S")); contextMenu.exec(globalPos);