Changed behaviour of the escape key, now always enables select mode

This commit is contained in:
Frans Schreuder 2013-07-02 23:15:40 +02:00
parent 10f3b76ed5
commit 159d34d47c
3 changed files with 12 additions and 6 deletions

View File

@ -301,6 +301,7 @@ public slots:
void slotInsertPort(bool);
void slotInsertEntity();
void slotSetWire(bool);
void slotEscape();
void slotSelect(bool);
void slotEditActivate(bool);
void slotInsertLabel(bool);

View File

@ -205,6 +205,12 @@ void QucsApp::slotZoomIn(bool on)
&MouseActions::MMoveZoomIn, &MouseActions::MPressZoomIn);
}
void QucsApp::slotEscape()
{
select->setChecked(true);
}
// -----------------------------------------------------------------------
// Is called when the select toolbar button is pressed.
void QucsApp::slotSelect(bool on)

View File

@ -401,13 +401,12 @@ void QucsApp::initActions()
magMinus->setWhatsThis(tr("Zoom out\n\nZooms out the current view"));
connect(magMinus, SIGNAL(activated()), SLOT(slotZoomOut()));
QAction *escape = new QAction(this);
escape->setShortcut(Qt::Key_Escape);
connect(escape, SIGNAL(activated()), SLOT(slotEscape()));
this->addAction(escape);
select = new QAction(QIcon((QucsSettings.BitmapDir + "pointer.png")), tr("Select"), this);
//QAction *esc = new QAction(this);
select->setShortcut(Qt::Key_Escape);
/*
connect(esc, SIGNAL(triggered()), SLOT(slotSelect(false)));
this->addAction(esc);
*/
select->setStatusTip(tr("Activate select mode"));
select->setWhatsThis(tr("Select\n\nActivates select mode"));
select->setToggleAction(true);