mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-17 19:05:31 +08:00
Ref T515, avoid unnecessary updating (last result ts) and UI adjustments
This commit is contained in:
committed by
Mat Sutcliffe
parent
610e1559e1
commit
13357516fa
@@ -2,27 +2,18 @@
|
|||||||
<ui version="4.0">
|
<ui version="4.0">
|
||||||
<class>CAircraftModelSetValidationDialog</class>
|
<class>CAircraftModelSetValidationDialog</class>
|
||||||
<widget class="QDialog" name="CAircraftModelSetValidationDialog">
|
<widget class="QDialog" name="CAircraftModelSetValidationDialog">
|
||||||
<property name="geometry">
|
<property name="minimumSize">
|
||||||
<rect>
|
<size>
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>640</width>
|
<width>640</width>
|
||||||
<height>480</height>
|
<height>400</height>
|
||||||
</rect>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Model validation</string>
|
<string>Model validation</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="vl_AircraaftModelValidation">
|
<layout class="QVBoxLayout" name="vl_AircraaftModelValidation">
|
||||||
<item>
|
<item>
|
||||||
<widget class="BlackGui::Components::CAircraftModelValidationComponent" name="comp_AircraftModelValidation">
|
<widget class="BlackGui::Components::CAircraftModelValidationComponent" name="comp_AircraftModelValidation"/>
|
||||||
<property name="frameShape">
|
|
||||||
<enum>QFrame::StyledPanel</enum>
|
|
||||||
</property>
|
|
||||||
<property name="frameShadow">
|
|
||||||
<enum>QFrame::Raised</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QDialogButtonBox" name="bb_CAircraftModelSetValidationDialog">
|
<widget class="QDialogButtonBox" name="bb_CAircraftModelSetValidationDialog">
|
||||||
|
|||||||
@@ -39,9 +39,12 @@ namespace BlackGui
|
|||||||
|
|
||||||
// 1st init when running in distributed environment
|
// 1st init when running in distributed environment
|
||||||
QPointer<CAircraftModelValidationComponent> myself(this);
|
QPointer<CAircraftModelValidationComponent> myself(this);
|
||||||
|
|
||||||
|
const qint64 lastResults = m_lastResults;
|
||||||
QTimer::singleShot(2500, this, [ = ]
|
QTimer::singleShot(2500, this, [ = ]
|
||||||
{
|
{
|
||||||
if (!myself || !sGui || sGui->isShuttingDown()) { return; }
|
if (!myself || !sGui || sGui->isShuttingDown()) { return; }
|
||||||
|
if (m_lastResults > lastResults) { return; } // values received in meantime
|
||||||
myself->requestLastResults();
|
myself->requestLastResults();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -53,6 +56,7 @@ namespace BlackGui
|
|||||||
{
|
{
|
||||||
Q_UNUSED(simulator);
|
Q_UNUSED(simulator);
|
||||||
Q_UNUSED(valid);
|
Q_UNUSED(valid);
|
||||||
|
m_lastResults = QDateTime::currentMSecsSinceEpoch();
|
||||||
ui->tvp_InvalidModels->updateContainerMaybeAsync(invalid);
|
ui->tvp_InvalidModels->updateContainerMaybeAsync(invalid);
|
||||||
ui->comp_Simulator->setValue(simulator);
|
ui->comp_Simulator->setValue(simulator);
|
||||||
ui->comp_Messages->clear();
|
ui->comp_Messages->clear();
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ namespace BlackGui
|
|||||||
private:
|
private:
|
||||||
QScopedPointer<Ui::CAircraftModelValidationComponent> ui;
|
QScopedPointer<Ui::CAircraftModelValidationComponent> ui;
|
||||||
BlackMisc::CSetting<BlackMisc::Simulation::Settings::TModelMatching> m_matchingSettings { this }; //!< settings
|
BlackMisc::CSetting<BlackMisc::Simulation::Settings::TModelMatching> m_matchingSettings { this }; //!< settings
|
||||||
|
qint64 m_lastResults = -1; //!< when received last results
|
||||||
|
|
||||||
//! Invalid models
|
//! Invalid models
|
||||||
void tempDisableModels(const BlackMisc::Simulation::CAircraftModelList &models);
|
void tempDisableModels(const BlackMisc::Simulation::CAircraftModelList &models);
|
||||||
|
|||||||
@@ -2,14 +2,6 @@
|
|||||||
<ui version="4.0">
|
<ui version="4.0">
|
||||||
<class>CAircraftModelValidationComponent</class>
|
<class>CAircraftModelValidationComponent</class>
|
||||||
<widget class="QFrame" name="CAircraftModelValidationComponent">
|
<widget class="QFrame" name="CAircraftModelValidationComponent">
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>640</width>
|
|
||||||
<height>480</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Model validation</string>
|
<string>Model validation</string>
|
||||||
</property>
|
</property>
|
||||||
@@ -50,7 +42,7 @@
|
|||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>Messages</string>
|
<string>Messages</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
<layout class="QVBoxLayout" name="vl_Messages">
|
||||||
<item>
|
<item>
|
||||||
<widget class="BlackGui::Components::CLogComponent" name="comp_Messages">
|
<widget class="BlackGui::Components::CLogComponent" name="comp_Messages">
|
||||||
<property name="frameShape">
|
<property name="frameShape">
|
||||||
@@ -67,7 +59,7 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QWidget" name="wi_Buttons" native="true">
|
<widget class="QWidget" name="wi_Buttons" native="true">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QHBoxLayout" name="hl_ValidationButtons">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="cb_EnableStartupCheck">
|
<widget class="QCheckBox" name="cb_EnableStartupCheck">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
|||||||
Reference in New Issue
Block a user