mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 17:35:34 +08:00
Misc. smaller fixes
* copy configuration dialog handles case if there is no other swift version * QPointer "guard" for lambda * first model set UI
This commit is contained in:
@@ -51,6 +51,7 @@ namespace BlackGui
|
||||
ui->setupUi(this);
|
||||
this->initOtherSwiftVersions();
|
||||
this->setWidths();
|
||||
m_hasOtherSwiftVersions = CDirectoryUtils::hasOtherSwiftDataDirectories();
|
||||
|
||||
ui->cb_ShowAll->setChecked(m_nameFilterDisables);
|
||||
connect(ui->rb_Cache, &QRadioButton::toggled, [ = ](bool) { this->initCurrentDirectories(true); });
|
||||
@@ -249,7 +250,12 @@ namespace BlackGui
|
||||
|
||||
// source
|
||||
const QString sourceDir = this->getOtherVersionsSelectedDirectory();
|
||||
if (!sourceModel || m_initializedSourceDir != sourceDir)
|
||||
if (!m_hasOtherSwiftVersions)
|
||||
{
|
||||
// no ther versions
|
||||
return;
|
||||
}
|
||||
else if (!sourceModel || m_initializedSourceDir != sourceDir)
|
||||
{
|
||||
m_initializedSourceDir = sourceDir;
|
||||
if (!sourceModel)
|
||||
@@ -353,6 +359,7 @@ namespace BlackGui
|
||||
|
||||
QStringList CCopyConfigurationComponent::getSelectedFiles() const
|
||||
{
|
||||
if (!m_hasOtherSwiftVersions) { return QStringList(); }
|
||||
const QModelIndexList indexes = ui->tv_Source->selectionModel()->selectedIndexes();
|
||||
if (indexes.isEmpty()) { return QStringList(); }
|
||||
const QFileSystemModel *sourceModel = qobject_cast<QFileSystemModel *>(ui->tv_Source->model());
|
||||
|
||||
@@ -126,6 +126,7 @@ namespace BlackGui
|
||||
bool m_logCopiedFiles = true;
|
||||
bool m_nameFilterDisables = false; //!< name filter disables or hides
|
||||
bool m_withBootstrapFile = false;
|
||||
bool m_hasOtherSwiftVersions = false;
|
||||
|
||||
// caches will be explicitly initialized in initCaches
|
||||
BlackMisc::Simulation::Data::CModelCaches m_modelCaches { false, this };
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="lbl_Explaination">
|
||||
<property name="text">
|
||||
<string><html><head/><body><p><span style=" font-size:9pt; font-weight:600; color:#ff0000;">WORK IN PROGRESS, not finished </span><span style=" font-size:9pt;">The model set defines which aircraft you will use in the simulator. From all models you have installed on your disk you can select a subset actually being used.</span></p></body></html></string>
|
||||
<string><html><head/><body><p><span style=" font-size:9pt; font-weight:600; color:#ff0000;">WORK IN PROGRESS (experimental) </span><span style=" font-size:9pt;">The model set defines which aircraft you will use in the simulator. From all models you have installed on your disk you can select a subset actually being used.</span></p></body></html></string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
@@ -56,7 +56,7 @@
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lbl_ModelDirectories">
|
||||
<property name="text">
|
||||
<string>Model directories:</string>
|
||||
<string>Model dir.:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -79,21 +79,21 @@
|
||||
<item row="1" column="0">
|
||||
<widget class="QPushButton" name="pb_ModelSet">
|
||||
<property name="text">
|
||||
<string>show set</string>
|
||||
<string>set</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QPushButton" name="pb_Models">
|
||||
<property name="text">
|
||||
<string> show models </string>
|
||||
<string>models</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QPushButton" name="pb_ModelsTriggerReload">
|
||||
<property name="text">
|
||||
<string> trigger reload </string>
|
||||
<string>reload</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
Reference in New Issue
Block a user