From e910277ebeedfe5341aaa51e7e49856cf2b31465 Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Wed, 26 Jul 2017 01:38:37 +0000 Subject: [PATCH] Force Settings tab to Radio tab when navigating there from a rig error message git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7947 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- Configuration.cpp | 1 + Configuration.hpp | 1 + mainwindow.cpp | 1 + 3 files changed, 3 insertions(+) diff --git a/Configuration.cpp b/Configuration.cpp index 03400aea6..d60b62286 100644 --- a/Configuration.cpp +++ b/Configuration.cpp @@ -603,6 +603,7 @@ QDir Configuration::data_dir () const {return m_->data_dir_;} QDir Configuration::writeable_data_dir () const {return m_->writeable_data_dir_;} QDir Configuration::temp_dir () const {return m_->temp_dir_;} +void Configuration::select_tab (int index) {m_->ui_->configuration_tabs->setCurrentIndex (index);} int Configuration::exec () {return m_->exec ();} bool Configuration::is_active () const {return m_->isVisible ();} diff --git a/Configuration.hpp b/Configuration.hpp index 924ebab82..bdeae5fb8 100644 --- a/Configuration.hpp +++ b/Configuration.hpp @@ -73,6 +73,7 @@ public: QWidget * parent = nullptr); ~Configuration (); + void select_tab (int); int exec (); bool is_active () const; diff --git a/mainwindow.cpp b/mainwindow.cpp index 603cc20fd..9112eec99 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -5598,6 +5598,7 @@ void MainWindow::rigFailure (QString const& reason) switch (m_rigErrorMessageBox.standardButton (clicked_button)) { case MessageBox::Ok: + m_config.select_tab (1); QTimer::singleShot (0, this, SLOT (on_actionSettings_triggered ())); break;