Skip to content

Commit

Permalink
Merge branch 'bugfix-291' into testing_0.31
Browse files Browse the repository at this point in the history
  • Loading branch information
foldynl committed Dec 16, 2023
2 parents 55136bf + 5c3310b commit f3ce4d0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
3 changes: 2 additions & 1 deletion res/data/sat_modes.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
{"id": "LU", "name": "L/U (1268 / 435)"},
{"id": "LS", "name": "L/S (1268 / 2400)"},
{"id": "LX", "name": "L/X (1268 / 10450)"},
{"id": "VS", "name": "V/S (145 / 2400)"}
{"id": "VS", "name": "V/S (145 / 2400)"},
{"id": "SX", "name": "S/X (2400 / 10450)"}
]
2 changes: 1 addition & 1 deletion ui/LogbookWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ LogbookWidget::LogbookWidget(QWidget *parent) :
ui->contactTable->setItemDelegateForColumn(LogbookModel::COLUMN_RX_PWR, new UnitFormatDelegate("W", 3, 0.1, ui->contactTable));
/*https://www.pe0sat.vgnet.nl/satellite/sat-information/modes/ */
/* use all possible values, do not use only modern modes in sat_modes.json */
ui->contactTable->setItemDelegateForColumn(LogbookModel::COLUMN_SAT_MODE, new ComboFormatDelegate(QStringList()<<" "<<"VU"<<"UV"<<"US"<<"LU"<<"LS"<<"LX"<<"VS"<<"K"<<"T"<<"A"<<"J"<<"B"<<"S"<<"L", ui->contactTable));
ui->contactTable->setItemDelegateForColumn(LogbookModel::COLUMN_SAT_MODE, new ComboFormatDelegate(QStringList()<<" "<<"VU"<<"UV"<<"US"<<"LU"<<"LS"<<"LX"<<"VS"<<"SX"<<"K"<<"T"<<"A"<<"J"<<"B"<<"S"<<"L", ui->contactTable));
ui->contactTable->setItemDelegateForColumn(LogbookModel::COLUMN_SFI, new UnitFormatDelegate("", 0, 1, ui->contactTable));
ui->contactTable->setItemDelegateForColumn(LogbookModel::COLUMN_SILENT_KEY, new ComboFormatDelegate(Data::instance()->boolEnum, ui->contactTable));
ui->contactTable->setItemDelegateForColumn(LogbookModel::COLUMN_SRX, new UnitFormatDelegate("", 0, 1, ui->contactTable));
Expand Down
19 changes: 10 additions & 9 deletions ui/QSODetailDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -557,16 +557,17 @@ void QSODetailDialog::setReadOnlyMode(bool inReadOnly)
}
}

if ( !inReadOnly )
if ( ui->propagationModeEdit->currentText() != Data::instance()->propagationModeIDToText("SAT") )
{
if ( ui->propagationModeEdit->currentText() != Data::instance()->propagationModeIDToText("SAT") )
{
/* Do not enable sat fields when SAT prop is not selected */
ui->satModeEdit->setCurrentIndex(-1);
ui->satNameEdit->clear();
ui->satModeEdit->setEnabled(false);
ui->satNameEdit->setEnabled(false);
}
/* Do not enable sat fields when SAT prop is not selected */
ui->satModeEdit->setCurrentIndex(-1);
ui->satNameEdit->clear();
ui->satModeEdit->setEnabled(false);
ui->satNameEdit->setEnabled(false);
}
else
{
ui->satNameEdit->setEnabled(true);
}

editButton->setText((( inReadOnly) ? EDIT_BUTTON_TEXT : SAVE_BUTTON_TEXT ));
Expand Down

0 comments on commit f3ce4d0

Please sign in to comment.