mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 06:35:52 +08:00
Ref T286, "version changed" in copy models
This commit is contained in:
@@ -34,8 +34,10 @@ namespace BlackGui
|
||||
{
|
||||
ui->setupUi(this);
|
||||
ui->comp_SimulatorSelector->setMode(CSimulatorSelector::CheckBoxes);
|
||||
ui->comp_SimulatorSelector->clear();
|
||||
ui->tvp_AircraftModels->setAircraftModelMode(CAircraftModelListModel::OwnModelSet);
|
||||
connect(ui->pb_StartCopying, &QPushButton::clicked, this, &CCopyModelsFromOtherSwiftVersionsComponent::copy);
|
||||
connect(ui->comp_OtherSwiftVersions, &COtherSwiftVersionsComponent::versionChanged, this, &CCopyModelsFromOtherSwiftVersionsComponent::onVersionChanged);
|
||||
}
|
||||
|
||||
CCopyModelsFromOtherSwiftVersionsComponent::~CCopyModelsFromOtherSwiftVersionsComponent()
|
||||
@@ -159,6 +161,16 @@ namespace BlackGui
|
||||
return reply == QMessageBox::Yes;
|
||||
}
|
||||
|
||||
void CCopyModelsFromOtherSwiftVersionsComponent::onVersionChanged(const CApplicationInfo &otherVersion)
|
||||
{
|
||||
const CSimulatorInfo cacheSims = m_modelCaches.otherVersionSimulatorsWithFile(otherVersion);
|
||||
const CSimulatorInfo setSims = m_modelSetCaches.otherVersionSimulatorsWithFile(otherVersion);
|
||||
|
||||
ui->cb_ModelCache->setChecked(cacheSims.isAnySimulator());
|
||||
ui->cb_ModelSet->setChecked(setSims.isAnySimulator());
|
||||
ui->comp_SimulatorSelector->setValue(setSims);
|
||||
}
|
||||
|
||||
bool CCopyModelsFromOtherSwiftVersionsWizardPage::validatePage()
|
||||
{
|
||||
Q_ASSERT_X(m_copyModels, Q_FUNC_INFO, "Missing widget");
|
||||
|
||||
Reference in New Issue
Block a user