mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 16:56:53 +08:00
Refs #868 Use CXPlaneUtil::xplaneRootDir() in the X-Plane plugin
This commit is contained in:
committed by
Mathew Sutcliffe
parent
f25d569ae8
commit
99c792dd4b
@@ -140,17 +140,9 @@ namespace BlackMisc
|
||||
return xbusLegacy;
|
||||
}
|
||||
}
|
||||
if (!xplane10Dir().isEmpty())
|
||||
{
|
||||
QString xbusLegacy = xplane10Dir() + legacyPath;
|
||||
if (QDir(xbusLegacy).exists())
|
||||
{
|
||||
return xbusLegacy;
|
||||
}
|
||||
}
|
||||
if (!xplane9Dir().isEmpty())
|
||||
{
|
||||
QString xbusLegacy = xplane9Dir() + legacyPath;
|
||||
|
||||
for (auto func: {&CXPlaneUtil::xplane11Dir, &CXPlaneUtil::xplane10Dir, &CXPlaneUtil::xplane9Dir}) {
|
||||
QString xbusLegacy = func() + legacyPath;
|
||||
if (QDir(xbusLegacy).exists())
|
||||
{
|
||||
return xbusLegacy;
|
||||
|
||||
@@ -83,9 +83,7 @@ namespace BlackSimPlugin
|
||||
|
||||
void CSimulatorXPlaneConfigWindow::ps_installXBus()
|
||||
{
|
||||
QString xPlaneLocation = BlackMisc::Simulation::XPlane::CXPlaneUtil::xplane10Dir();
|
||||
if (xPlaneLocation.isEmpty())
|
||||
xPlaneLocation = BlackMisc::Simulation::XPlane::CXPlaneUtil::xplane9Dir();
|
||||
QString xPlaneLocation = BlackMisc::Simulation::XPlane::CXPlaneUtil::xplaneRootDir();
|
||||
|
||||
QString path = QFileDialog::getExistingDirectory(parentWidget(),
|
||||
tr("Choose your X-Plane install directory"),
|
||||
|
||||
Reference in New Issue
Block a user