Reenabled Ctrl+P shortcut for "print model"

This commit is contained in:
Damjan Adamic
2014-05-04 18:08:55 +02:00
parent 8787dd05cd
commit 0fc8a5e2f2
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -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()));
+1 -1
View File
@@ -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);