mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 17:35:34 +08:00
[FSD] Ref T753, avoid ":" in FPs
Also avoid unnecessary roundtrips of UI updates
This commit is contained in:
@@ -520,8 +520,10 @@ namespace BlackCore
|
||||
// Removed with T353 although it is standard
|
||||
// const QString route = QString(flightPlan.getRoute()).replace(" ", ".");
|
||||
|
||||
const QString route = flightPlan.getRoute();
|
||||
const QString remarks = flightPlan.getRemarks();
|
||||
QString route = flightPlan.getRoute();
|
||||
QString remarks = flightPlan.getRemarks();
|
||||
route.remove(':');
|
||||
remarks.remove(':');
|
||||
|
||||
//! \fixme that would be the official string, can this be used?
|
||||
const QString alt = flightPlan.getCruiseAltitude().asFpVatsimAltitudeString();
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "blackcore/context/contextownaircraft.h"
|
||||
#include "blackcore/context/contextsimulator.h"
|
||||
#include "blackcore/webdataservices.h"
|
||||
#include "blackmisc/simulation/simulatedaircraft.h"
|
||||
#include "blackmisc/aviation/aircrafticaocode.h"
|
||||
#include "blackmisc/aviation/airportlist.h"
|
||||
#include "blackmisc/aviation/altitude.h"
|
||||
@@ -27,11 +28,12 @@
|
||||
#include "blackmisc/pq/units.h"
|
||||
#include "blackmisc/logcategory.h"
|
||||
#include "blackmisc/logmessage.h"
|
||||
#include "blackconfig/buildconfig.h"
|
||||
#include "blackmisc/network/user.h"
|
||||
#include "blackmisc/simulation/simulatedaircraft.h"
|
||||
#include "blackmisc/directoryutils.h"
|
||||
#include "blackmisc/statusmessage.h"
|
||||
#include "blackmisc/stringutils.h"
|
||||
#include "blackconfig/buildconfig.h"
|
||||
|
||||
#include "ui_flightplancomponent.h"
|
||||
|
||||
#include <QCheckBox>
|
||||
@@ -1103,11 +1105,18 @@ namespace BlackGui
|
||||
const QObject *sender = QObject::sender();
|
||||
if (sender == ui->cb_VoiceCapabilities)
|
||||
{
|
||||
const QString ct = ui->cb_VoiceCapabilitiesFirstPage->currentText();
|
||||
if (stringCompare(ct, text, Qt::CaseInsensitive)) { return; }
|
||||
ui->cb_VoiceCapabilitiesFirstPage->setCurrentText(text);
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->cb_VoiceCapabilities->setCurrentText(text);
|
||||
const QString ct = ui->cb_VoiceCapabilities->currentText();
|
||||
if (!stringCompare(ct, text, Qt::CaseInsensitive))
|
||||
{
|
||||
// avoid unnecessary roundtrips
|
||||
ui->cb_VoiceCapabilities->setCurrentText(text);
|
||||
}
|
||||
const QString r = CFlightPlanRemarks::replaceVoiceCapabilities(CFlightPlanRemarks::textToVoiceCapabilitiesRemarks(text), ui->pte_Remarks->toPlainText());
|
||||
if (ui->pte_Remarks->toPlainText() != r)
|
||||
{
|
||||
|
||||
@@ -132,7 +132,7 @@ namespace BlackGui
|
||||
QString getDefaultFilename(bool load);
|
||||
|
||||
//! Call \sa buildRemarksString from combo box signal
|
||||
void currentTextChangedToBuildRemarks(const QString &text) { this->buildRemarksString(); Q_UNUSED(text); }
|
||||
void currentTextChangedToBuildRemarks(const QString &text) { this->buildRemarksString(); Q_UNUSED(text) }
|
||||
|
||||
//! Voice combo boxes shall display the same
|
||||
void syncVoiceComboBoxes(const QString &text);
|
||||
|
||||
Reference in New Issue
Block a user