mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 23:05:36 +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">
|
||||
<class>CAircraftModelSetValidationDialog</class>
|
||||
<widget class="QDialog" name="CAircraftModelSetValidationDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>640</width>
|
||||
<height>480</height>
|
||||
</rect>
|
||||
<height>400</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Model validation</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="vl_AircraaftModelValidation">
|
||||
<item>
|
||||
<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>
|
||||
<widget class="BlackGui::Components::CAircraftModelValidationComponent" name="comp_AircraftModelValidation"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="bb_CAircraftModelSetValidationDialog">
|
||||
|
||||
@@ -39,9 +39,12 @@ namespace BlackGui
|
||||
|
||||
// 1st init when running in distributed environment
|
||||
QPointer<CAircraftModelValidationComponent> myself(this);
|
||||
|
||||
const qint64 lastResults = m_lastResults;
|
||||
QTimer::singleShot(2500, this, [ = ]
|
||||
{
|
||||
if (!myself || !sGui || sGui->isShuttingDown()) { return; }
|
||||
if (m_lastResults > lastResults) { return; } // values received in meantime
|
||||
myself->requestLastResults();
|
||||
});
|
||||
}
|
||||
@@ -53,6 +56,7 @@ namespace BlackGui
|
||||
{
|
||||
Q_UNUSED(simulator);
|
||||
Q_UNUSED(valid);
|
||||
m_lastResults = QDateTime::currentMSecsSinceEpoch();
|
||||
ui->tvp_InvalidModels->updateContainerMaybeAsync(invalid);
|
||||
ui->comp_Simulator->setValue(simulator);
|
||||
ui->comp_Messages->clear();
|
||||
|
||||
@@ -55,6 +55,7 @@ namespace BlackGui
|
||||
private:
|
||||
QScopedPointer<Ui::CAircraftModelValidationComponent> ui;
|
||||
BlackMisc::CSetting<BlackMisc::Simulation::Settings::TModelMatching> m_matchingSettings { this }; //!< settings
|
||||
qint64 m_lastResults = -1; //!< when received last results
|
||||
|
||||
//! Invalid models
|
||||
void tempDisableModels(const BlackMisc::Simulation::CAircraftModelList &models);
|
||||
|
||||
@@ -2,14 +2,6 @@
|
||||
<ui version="4.0">
|
||||
<class>CAircraftModelValidationComponent</class>
|
||||
<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">
|
||||
<string>Model validation</string>
|
||||
</property>
|
||||
@@ -50,7 +42,7 @@
|
||||
<attribute name="title">
|
||||
<string>Messages</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<layout class="QVBoxLayout" name="vl_Messages">
|
||||
<item>
|
||||
<widget class="BlackGui::Components::CLogComponent" name="comp_Messages">
|
||||
<property name="frameShape">
|
||||
@@ -67,7 +59,7 @@
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="wi_Buttons" native="true">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<layout class="QHBoxLayout" name="hl_ValidationButtons">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="cb_EnableStartupCheck">
|
||||
<property name="text">
|
||||
|
||||
Reference in New Issue
Block a user