mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-22 04:11:16 -05:00
Fix re-initialization issue in Configuration
Do not use a static scope variable where a class instance variable is needed. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6660 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
bdd3d866c6
commit
d8350bd35e
@ -489,6 +489,7 @@ private:
|
|||||||
|
|
||||||
TransceiverFactory::ParameterPack rig_params_;
|
TransceiverFactory::ParameterPack rig_params_;
|
||||||
TransceiverFactory::ParameterPack saved_rig_params_;
|
TransceiverFactory::ParameterPack saved_rig_params_;
|
||||||
|
bool last_port_type_;
|
||||||
bool rig_is_dummy_;
|
bool rig_is_dummy_;
|
||||||
bool rig_active_;
|
bool rig_active_;
|
||||||
bool have_rig_;
|
bool have_rig_;
|
||||||
@ -753,6 +754,8 @@ Configuration::impl::impl (Configuration * self, QDir const& temp_directory,
|
|||||||
, current_tx_offset_ {0}
|
, current_tx_offset_ {0}
|
||||||
, frequency_dialog_ {new FrequencyDialog {&modes_, this}}
|
, frequency_dialog_ {new FrequencyDialog {&modes_, this}}
|
||||||
, station_dialog_ {new StationDialog {&next_stations_, &bands_, this}}
|
, station_dialog_ {new StationDialog {&next_stations_, &bands_, this}}
|
||||||
|
, last_port_type_ {TransceiverFactory::Capabilities::none}
|
||||||
|
, rig_is_dummy_ {false}
|
||||||
, rig_active_ {false}
|
, rig_active_ {false}
|
||||||
, have_rig_ {false}
|
, have_rig_ {false}
|
||||||
, rig_changed_ {false}
|
, rig_changed_ {false}
|
||||||
@ -1417,7 +1420,6 @@ void Configuration::impl::set_rig_invariants ()
|
|||||||
ui_->CAT_poll_interval_label->setEnabled (!asynchronous_CAT);
|
ui_->CAT_poll_interval_label->setEnabled (!asynchronous_CAT);
|
||||||
ui_->CAT_poll_interval_spin_box->setEnabled (!asynchronous_CAT);
|
ui_->CAT_poll_interval_spin_box->setEnabled (!asynchronous_CAT);
|
||||||
|
|
||||||
static auto last_port_type = TransceiverFactory::Capabilities::none;
|
|
||||||
auto port_type = transceiver_factory_.CAT_port_type (rig);
|
auto port_type = transceiver_factory_.CAT_port_type (rig);
|
||||||
|
|
||||||
bool is_serial_CAT (TransceiverFactory::Capabilities::serial == port_type);
|
bool is_serial_CAT (TransceiverFactory::Capabilities::serial == port_type);
|
||||||
@ -1464,9 +1466,9 @@ void Configuration::impl::set_rig_invariants ()
|
|||||||
ui_->test_CAT_push_button->setEnabled (true);
|
ui_->test_CAT_push_button->setEnabled (true);
|
||||||
ui_->test_PTT_push_button->setEnabled (false);
|
ui_->test_PTT_push_button->setEnabled (false);
|
||||||
ui_->TX_audio_source_group_box->setEnabled (transceiver_factory_.has_CAT_PTT_mic_data (rig) && TransceiverFactory::PTT_method_CAT == ptt_method);
|
ui_->TX_audio_source_group_box->setEnabled (transceiver_factory_.has_CAT_PTT_mic_data (rig) && TransceiverFactory::PTT_method_CAT == ptt_method);
|
||||||
if (port_type != last_port_type)
|
if (port_type != last_port_type_)
|
||||||
{
|
{
|
||||||
last_port_type = port_type;
|
last_port_type_ = port_type;
|
||||||
switch (port_type)
|
switch (port_type)
|
||||||
{
|
{
|
||||||
case TransceiverFactory::Capabilities::serial:
|
case TransceiverFactory::Capabilities::serial:
|
||||||
|
Loading…
Reference in New Issue
Block a user