mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-06 10:15:38 +08:00
@@ -168,10 +168,13 @@ namespace BlackGui
|
||||
return CStatusMessage(this, CStatusMessage::SeverityError,
|
||||
"Cannot add data for " + simulator.toQString(true) + " to " + this->getModelSetSimulator().toQString(true), true);
|
||||
}
|
||||
|
||||
const bool allowExcludedModels = this->m_modelSettings.get().getAllowExcludedModels();
|
||||
CAircraftModelList updateModels(this->getModelSet());
|
||||
const int d = updateModels.replaceOrAddModelsWithString(models, Qt::CaseInsensitive);
|
||||
int d = updateModels.replaceOrAddModelsWithString(models, Qt::CaseInsensitive);
|
||||
if (d > 0)
|
||||
{
|
||||
if (!allowExcludedModels) { updateModels.removeIfExcluded(); }
|
||||
updateModels.resetOrder();
|
||||
ui->tvp_OwnModelSet->updateContainerMaybeAsync(updateModels);
|
||||
return CStatusMessage(this, CStatusMessage::SeverityInfo, "Modified " + QString::number(d) + " entries in model set " + this->getModelSetSimulator().toQString(true), true);
|
||||
@@ -274,6 +277,11 @@ namespace BlackGui
|
||||
}
|
||||
}
|
||||
|
||||
void CDbOwnModelSetComponent::ps_modelSettingsChanged()
|
||||
{
|
||||
// void
|
||||
}
|
||||
|
||||
void CDbOwnModelSetComponent::ps_viewModelChanged()
|
||||
{
|
||||
ui->pb_SaveAsSetForSimulator->setEnabled(true);
|
||||
|
||||
@@ -29,8 +29,8 @@
|
||||
class QAction;
|
||||
class QWidget;
|
||||
|
||||
namespace BlackMisc { namespace Simulation { class CAircraftModel; } }
|
||||
namespace Ui { class CDbOwnModelSetComponent; }
|
||||
namespace BlackMisc { namespace Simulation { class CAircraftModel; } }
|
||||
namespace BlackGui
|
||||
{
|
||||
namespace Menus { class CMenuActions; }
|
||||
@@ -122,6 +122,9 @@ namespace BlackGui
|
||||
//! Preferences changed
|
||||
void ps_distributorPreferencesChanged();
|
||||
|
||||
//! Model settings changed
|
||||
void ps_modelSettingsChanged();
|
||||
|
||||
//! Model (of view) has been changed
|
||||
void ps_viewModelChanged();
|
||||
|
||||
@@ -144,7 +147,8 @@ namespace BlackGui
|
||||
QScopedPointer<Ui::CDbOwnModelSetComponent> ui;
|
||||
QScopedPointer<CDbOwnModelSetDialog> m_modelSetDialog;
|
||||
BlackMisc::Simulation::CAircraftModelSetLoader m_modelSetLoader { this };
|
||||
BlackMisc::CSetting<BlackMisc::Simulation::TDistributorListPreferences> m_distributorPreferences { this, &CDbOwnModelSetComponent::ps_distributorPreferencesChanged };
|
||||
BlackMisc::CSettingReadOnly<BlackMisc::Simulation::TDistributorListPreferences> m_distributorPreferences { this, &CDbOwnModelSetComponent::ps_distributorPreferencesChanged }; //!< distributor preferences
|
||||
BlackMisc::CSettingReadOnly<BlackMisc::Simulation::TModel> m_modelSettings { this, &CDbOwnModelSetComponent::ps_modelSettingsChanged }; //!< settings for models
|
||||
|
||||
// -------------------------- custom menus -----------------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user