mirror of
https://github.com/PCSX2/pcsx2.git
synced 2026-11-13 17:50:13 +01:00
DEV9: Use a signal blocker instead of disconnecting signal
This commit is contained in:
1 parent
5af5fe8387
commit
cd907584ee
1 file changed
+2
-3
@@ -836,8 +836,8 @@ void DEV9SettingsWidget::showEvent(QShowEvent* event)
|
||||
//This means that this setting can get out of sync with true value, so revert to that if the ui is closed and opened
|
||||
const std::string value = m_dialog->getStringValue("DEV9/Eth", "EthApi", Pcsx2Config::DEV9Options::NetApiNames[static_cast<int>(Pcsx2Config::DEV9Options::NetApi::Unset)]).value();
|
||||
|
||||
//disconnect temporally to prevent saving a vaule already in the config file
|
||||
disconnect(m_ui.ethDev, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &DEV9SettingsWidget::onEthDeviceChanged);
|
||||
//SignalBlocker to prevent saving a value already in the config file
|
||||
QSignalBlocker sb(m_ui.ethDev);
|
||||
for (int i = 0; m_api_namelist[i] != nullptr; i++)
|
||||
{
|
||||
if (value == m_api_valuelist[i])
|
||||
@@ -846,7 +846,6 @@ void DEV9SettingsWidget::showEvent(QShowEvent* event)
|
||||
break;
|
||||
}
|
||||
}
|
||||
connect(m_ui.ethDev, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &DEV9SettingsWidget::onEthDeviceChanged);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in new issue
Block a user