Sketcher: add option to disable leaving sketch with Esc button

This commit is contained in:
wmayer
2020-02-09 13:52:09 +01:00
parent 1e7e459533
commit c01c1f7fde
7 changed files with 42 additions and 3 deletions

View File

@@ -477,7 +477,7 @@ void TaskView::keyPressEvent(QKeyEvent* ke)
}
}
}
else if (ke->key() == Qt::Key_Escape) {
else if (ke->key() == Qt::Key_Escape && ActiveDialog->isEscapeButtonEnabled()) {
// get only the buttons of the button box
QDialogButtonBox* box = ActiveCtrl->standardButtons();
QList<QAbstractButton*> list = box->buttons();