Added ability to open settings to a specific tab to make editing macros easier
This commit is contained in:
parent
8b9042e2d6
commit
5a18b3f9fb
@ -2274,8 +2274,13 @@ void MainWindow::on_actionReset_Window_Sizes_triggered(){
|
||||
});
|
||||
}
|
||||
|
||||
void MainWindow::on_actionSettings_triggered() //Setup Dialog
|
||||
{
|
||||
void MainWindow::on_actionSettings_triggered(){
|
||||
openSettings();
|
||||
}
|
||||
|
||||
void MainWindow::openSettings(int tab){
|
||||
m_config.select_tab(tab);
|
||||
|
||||
// things that might change that we need know about
|
||||
auto callsign = m_config.my_callsign ();
|
||||
auto my_grid = m_config.my_grid ();
|
||||
@ -2288,6 +2293,7 @@ void MainWindow::on_actionSettings_triggered() //Setup Dialog
|
||||
if (m_config.my_callsign () != callsign || m_config.my_grid () != my_grid) {
|
||||
statusUpdate ();
|
||||
}
|
||||
|
||||
on_dxGridEntry_textChanged (m_hisGrid); // recalculate distances in case of units change
|
||||
enable_DXCC_entity (m_config.DXCC ()); // sets text window proportions and (re)inits the logbook
|
||||
|
||||
@ -2325,8 +2331,8 @@ void MainWindow::on_actionSettings_triggered() //Setup Dialog
|
||||
ui->label_6->setText("Single-Period Decodes");
|
||||
ui->label_7->setText("Average Decodes");
|
||||
} else {
|
||||
// ui->label_6->setText("Band Activity");
|
||||
// ui->label_7->setText("Rx Frequency");
|
||||
// ui->label_6->setText("Band Activity");
|
||||
// ui->label_7->setText("Rx Frequency");
|
||||
}
|
||||
update_watchdog_label ();
|
||||
if(!m_splitMode) ui->cbCQTx->setChecked(false);
|
||||
@ -6077,13 +6083,13 @@ void MainWindow::resetMessageUI(){
|
||||
bool MainWindow::ensureCallsignSet(bool alert){
|
||||
if(m_config.my_callsign().trimmed().isEmpty()){
|
||||
if(alert) MessageBox::warning_message(this, tr ("Please enter your callsign in the settings."));
|
||||
on_actionSettings_triggered();
|
||||
openSettings();
|
||||
return false;
|
||||
}
|
||||
|
||||
if(m_config.my_grid().trimmed().isEmpty()){
|
||||
if(alert) MessageBox::warning_message(this, tr ("Please enter your grid locator in the settings."));
|
||||
on_actionSettings_triggered();
|
||||
openSettings();
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -7870,7 +7876,7 @@ void MainWindow::on_queryButton_pressed(){
|
||||
|
||||
void MainWindow::on_macrosMacroButton_pressed(){
|
||||
if(m_config.macros()->stringList().isEmpty()){
|
||||
on_actionSettings_triggered();
|
||||
openSettings(3);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -7888,7 +7894,9 @@ void MainWindow::on_macrosMacroButton_pressed(){
|
||||
menu->addSeparator();
|
||||
auto action = new QAction(QIcon::fromTheme("edit-edit"), QString("Edit"), menu);
|
||||
menu->addAction(action);
|
||||
connect(action, &QAction::triggered, this, &MainWindow::on_actionSettings_triggered);
|
||||
connect(action, &QAction::triggered, this, [this](){
|
||||
openSettings(3);
|
||||
});
|
||||
|
||||
ui->macrosMacroButton->setMenu(menu);
|
||||
ui->macrosMacroButton->showMenu();
|
||||
|
@ -173,6 +173,7 @@ private slots:
|
||||
void on_actionShow_Waterfall_Controls_triggered(bool checked);
|
||||
void on_actionReset_Window_Sizes_triggered();
|
||||
void on_actionSettings_triggered();
|
||||
void openSettings(int tab=0);
|
||||
void prepareSpotting();
|
||||
void on_spotButton_clicked(bool checked);
|
||||
void on_monitorButton_clicked (bool);
|
||||
|
Loading…
Reference in New Issue
Block a user