mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 20:15:35 +08:00
Update xswiftbus.conf when updating connection details
ref T434
This commit is contained in:
committed by
Klaus Basan
parent
e6981d9c28
commit
2843e20d54
@@ -10,12 +10,14 @@
|
||||
#include "simulatorxplaneconfigwindow.h"
|
||||
#include "blackcore/application.h"
|
||||
#include "ui_simulatorxplaneconfigwindow.h"
|
||||
#include "blackmisc/simulation/xplane/xswiftbusconfigwriter.h"
|
||||
|
||||
#include <QComboBox>
|
||||
#include <QDialogButtonBox>
|
||||
|
||||
using namespace BlackGui;
|
||||
using namespace BlackMisc;
|
||||
using namespace BlackMisc::Simulation::XPlane;
|
||||
|
||||
namespace BlackSimPlugin
|
||||
{
|
||||
@@ -39,9 +41,13 @@ namespace BlackSimPlugin
|
||||
void CSimulatorXPlaneConfigWindow::onSettingsAccepted()
|
||||
{
|
||||
const QString currentAddress = m_xswiftbusServerSetting.getThreadLocal();
|
||||
const QString updatedAddress = ui->comp_SettingsXSwiftBus->getDBusAddress();
|
||||
if (currentAddress != ui->comp_SettingsXSwiftBus->getDBusAddress())
|
||||
{
|
||||
m_xswiftbusServerSetting.set(ui->comp_SettingsXSwiftBus->getDBusAddress());
|
||||
m_xswiftbusServerSetting.set(updatedAddress);
|
||||
CXSwiftBusConfigWriter xswiftbusConfigWriter;
|
||||
xswiftbusConfigWriter.setDBusAddress(updatedAddress);
|
||||
xswiftbusConfigWriter.updateInAllXPlaneVersions();
|
||||
}
|
||||
close();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user