refreshes metadata + list when changing external content directories. (just using RefreshMetadata does not work)
This commit is contained in:
parent
ec67cbce81
commit
6bf5a4b4b4
|
|
@ -99,6 +99,8 @@ ConfigureDialog::ConfigureDialog(QWidget* parent, HotkeyRegistry& registry_,
|
|||
}
|
||||
});
|
||||
connect(ui_tab.get(), &ConfigureUi::LanguageChanged, this, &ConfigureDialog::OnLanguageChanged);
|
||||
connect(filesystem_tab.get(), &ConfigureFilesystem::ExternalContentDirsChanged, this,
|
||||
&ConfigureDialog::ExternalContentDirsChanged);
|
||||
connect(ui->selectorList, &QListWidget::itemSelectionChanged, this,
|
||||
&ConfigureDialog::UpdateVisibleTabs);
|
||||
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@ private slots:
|
|||
|
||||
signals:
|
||||
void LanguageChanged(const QString& locale);
|
||||
void ExternalContentDirsChanged();
|
||||
|
||||
private:
|
||||
void changeEvent(QEvent* event) override;
|
||||
|
|
|
|||
|
|
@ -107,10 +107,15 @@ void ConfigureFilesystem::ApplyConfiguration() {
|
|||
|
||||
UISettings::values.cache_game_list = ui->cache_game_list->isChecked();
|
||||
|
||||
Settings::values.external_content_dirs.clear();
|
||||
std::vector<std::string> new_dirs;
|
||||
new_dirs.reserve(ui->external_content_list->count());
|
||||
for (int i = 0; i < ui->external_content_list->count(); ++i) {
|
||||
Settings::values.external_content_dirs.push_back(
|
||||
ui->external_content_list->item(i)->text().toStdString());
|
||||
new_dirs.push_back(ui->external_content_list->item(i)->text().toStdString());
|
||||
}
|
||||
|
||||
if (new_dirs != Settings::values.external_content_dirs) {
|
||||
Settings::values.external_content_dirs = std::move(new_dirs);
|
||||
emit ExternalContentDirsChanged();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,9 @@ public:
|
|||
|
||||
void ApplyConfiguration();
|
||||
|
||||
signals:
|
||||
void ExternalContentDirsChanged();
|
||||
|
||||
private:
|
||||
void changeEvent(QEvent* event) override;
|
||||
|
||||
|
|
|
|||
|
|
@ -3387,6 +3387,8 @@ void MainWindow::OnConfigure() {
|
|||
!multiplayer_state->IsHostingPublicRoom());
|
||||
connect(&configure_dialog, &ConfigureDialog::LanguageChanged, this,
|
||||
&MainWindow::OnLanguageChanged);
|
||||
connect(&configure_dialog, &ConfigureDialog::ExternalContentDirsChanged, this,
|
||||
&MainWindow::OnGameListRefresh);
|
||||
|
||||
const auto result = configure_dialog.exec();
|
||||
if (result != QDialog::Accepted && !UISettings::values.configuration_applied &&
|
||||
|
|
|
|||
Loading…
Reference in New Issue