mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 05:26:45 +08:00
Also allow to set "only in error/warning" case from validation dialog
This commit is contained in:
@@ -33,7 +33,11 @@ namespace BlackGui
|
||||
|
||||
const CAircraftMatcherSetup setup = m_matchingSettings.get();
|
||||
ui->cb_EnableStartupCheck->setChecked(setup.doVerificationAtStartup());
|
||||
connect(ui->cb_EnableStartupCheck, &QCheckBox::toggled, this, &CAircraftModelValidationComponent::onCheckAtStartupChanged);
|
||||
ui->cb_OnlyIfErrorsOrWarnings->setChecked(setup.onlyShowVerificationWarningsAndErrors());
|
||||
|
||||
connect(ui->cb_EnableStartupCheck, &QCheckBox::toggled, this, &CAircraftModelValidationComponent::onCheckAtStartupChanged);
|
||||
connect(ui->cb_OnlyIfErrorsOrWarnings, &QCheckBox::toggled, this, &CAircraftModelValidationComponent::onOnlyErrorWarningChanged);
|
||||
|
||||
connect(ui->pb_TempDisableInvalid, &QPushButton::released, this, &CAircraftModelValidationComponent::onButtonClicked);
|
||||
connect(ui->pb_TempDisableSelected, &QPushButton::released, this, &CAircraftModelValidationComponent::onButtonClicked);
|
||||
connect(ui->pb_TriggerValidation, &QPushButton::released, this, &CAircraftModelValidationComponent::triggerValidation);
|
||||
@@ -118,6 +122,15 @@ namespace BlackGui
|
||||
Q_UNUSED(msg);
|
||||
}
|
||||
|
||||
void CAircraftModelValidationComponent::onOnlyErrorWarningChanged(bool checked)
|
||||
{
|
||||
CAircraftMatcherSetup setup = m_matchingSettings.get();
|
||||
if (setup.onlyShowVerificationWarningsAndErrors() == checked) { return; }
|
||||
setup.setOnlyShowVerificationWarningsAndErrors(checked);
|
||||
const CStatusMessage msg = m_matchingSettings.setAndSave(setup);
|
||||
Q_UNUSED(msg);
|
||||
}
|
||||
|
||||
void CAircraftModelValidationComponent::triggerValidation()
|
||||
{
|
||||
if (!sGui || sGui->isShuttingDown() || !sGui->supportsContexts()) { return; }
|
||||
|
||||
Reference in New Issue
Block a user