mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 01:05:34 +08:00
refs #585, allow to use last simulator as default
This commit is contained in:
@@ -97,6 +97,12 @@ namespace BlackGui
|
||||
if (simulator.p3d()) { this->ui->rb_P3D->setChecked(simulator.p3d()); return; }
|
||||
}
|
||||
|
||||
void CSimulatorSelector::setToLastSelection()
|
||||
{
|
||||
const CSimulatorInfo sim = this->m_currentSimulator.get();
|
||||
this->setValue(sim);
|
||||
}
|
||||
|
||||
void CSimulatorSelector::setAll()
|
||||
{
|
||||
// checkboxes
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
#include "blackgui/blackguiexport.h"
|
||||
#include "blackmisc/simulation/simulatorinfo.h"
|
||||
#include "blackmisc/simulation/data/modelcaches.h"
|
||||
|
||||
#include <QFrame>
|
||||
#include <QObject>
|
||||
@@ -58,6 +59,9 @@ namespace BlackGui
|
||||
//! Set the value
|
||||
void setValue(const BlackMisc::Simulation::CSimulatorInfo &simulator);
|
||||
|
||||
//! Set to last selection
|
||||
void setToLastSelection();
|
||||
|
||||
//! Set all, only making sense with checkboxes
|
||||
void setAll();
|
||||
|
||||
@@ -85,6 +89,7 @@ namespace BlackGui
|
||||
QScopedPointer<Ui::CSimulatorSelector> ui;
|
||||
Mode m_mode = CheckBoxes;
|
||||
bool m_noSelectionMeansAll = false; //!< for filters, no selection means all
|
||||
BlackMisc::CDataReadOnly<BlackMisc::Simulation::Data::ModelSetLastSelection> m_currentSimulator { this }; //!< current simulator
|
||||
};
|
||||
} // ns
|
||||
} // ns
|
||||
|
||||
Reference in New Issue
Block a user