Exit gracefully if no softkey definitions are found

This commit is contained in:
Patrick Linstruth 2019-05-22 13:04:29 -07:00
parent e2fc500ec8
commit 3e25b1f646

View File

@ -157,6 +157,17 @@ MainWidget::MainWidget(QWidget *parent)
}
n++;
}
//
// If no softkeys have been defined, gracefully exit
//
if (!key_macros.size()) {
QMessageBox::critical(this, tr("RDSoftKeys"),
tr(QString("No SoftKey definitions found in file\n%1")
.arg(map_filename)));
exit(1);
}
if((key_macros.size()%key_columns)==0) {
key_ysize-=60;
}