mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 13:36:48 +08:00
Improved model validation dialog
* validation can be triggered async * validation context menu can be disabled * originally Ref T247
This commit is contained in:
committed by
Mat Sutcliffe
parent
86f14046bf
commit
8344f03cf3
@@ -12,6 +12,7 @@
|
||||
|
||||
#include <QPushButton>
|
||||
#include <QDialogButtonBox>
|
||||
#include <QPointer>
|
||||
|
||||
using namespace BlackMisc;
|
||||
using namespace BlackMisc::Simulation;
|
||||
@@ -35,6 +36,16 @@ namespace BlackGui
|
||||
CAircraftModelValidationDialog::~CAircraftModelValidationDialog()
|
||||
{ }
|
||||
|
||||
void CAircraftModelValidationDialog::triggerValidation(int delayMs)
|
||||
{
|
||||
QPointer<CAircraftModelValidationDialog> myself(this);
|
||||
QTimer::singleShot(delayMs, this, [ = ]
|
||||
{
|
||||
if (!myself) { return; }
|
||||
this->validate();
|
||||
});
|
||||
}
|
||||
|
||||
void CAircraftModelValidationDialog::validate()
|
||||
{
|
||||
ui->comp_StatusMessage->clear();
|
||||
|
||||
Reference in New Issue
Block a user