Merge branch 'deltecent-rdsoftkeys'

This commit is contained in:
Fred Gleason 2019-05-23 15:00:27 -04:00
commit 4c8b6ad0b8
2 changed files with 14 additions and 0 deletions

View File

@ -18681,3 +18681,6 @@
2019-05-19 Patrick Linstruth <patrick@deltecent.com> 2019-05-19 Patrick Linstruth <patrick@deltecent.com>
* Fixed bug in 'RDCartDialog' that caused an empty scheduler code * Fixed bug in 'RDCartDialog' that caused an empty scheduler code
dropdown box. dropdown box.
2019-05-23 Patrick Linstruth <patrick@deltecent.com>
* Display error dialog in rdsoftkeys(1) if no defintions are
found in map file.

View File

@ -157,6 +157,17 @@ MainWidget::MainWidget(QWidget *parent)
} }
n++; 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) { if((key_macros.size()%key_columns)==0) {
key_ysize-=60; key_ysize-=60;
} }