diff --git a/vkconfig_core/configuration_manager.cpp b/vkconfig_core/configuration_manager.cpp index 4c9c59f081..5ff0c44204 100644 --- a/vkconfig_core/configuration_manager.cpp +++ b/vkconfig_core/configuration_manager.cpp @@ -132,6 +132,12 @@ void ConfigurationManager::LoadDefaultConfigurations(const LayerManager &layers) } } +void ConfigurationManager::UpdateLayers(const LayerManager &layers) { + for (std::size_t i = 0, n = this->available_configurations.size(); i < n; ++i) { + this->available_configurations[i].GatherParameters(layers); + } +} + void ConfigurationManager::SortConfigurations() { struct Compare { bool operator()(const Configuration &a, const Configuration &b) const { diff --git a/vkconfig_core/configuration_manager.h b/vkconfig_core/configuration_manager.h index 136263499f..cceb561f82 100644 --- a/vkconfig_core/configuration_manager.h +++ b/vkconfig_core/configuration_manager.h @@ -44,6 +44,8 @@ class ConfigurationManager : public Serialize { void LoadAllConfigurations(const LayerManager& layers); void SaveAllConfigurations() const; + void UpdateLayers(const LayerManager& layers); + Configuration& CreateConfiguration(const LayerManager& layers, const std::string& configuration_name); Configuration& DuplicateConfiguration(const LayerManager& layers, const std::string& configuration_name); void RemoveConfiguration(const std::string& configuration_name); diff --git a/vkconfig_gui/tab_layers.cpp b/vkconfig_gui/tab_layers.cpp index 660470f6d4..18cbf8d144 100644 --- a/vkconfig_gui/tab_layers.cpp +++ b/vkconfig_gui/tab_layers.cpp @@ -162,6 +162,8 @@ void TabLayers::on_layers_reload_pressed() { std::this_thread::sleep_until(std::chrono::system_clock::now() + std::chrono::milliseconds(10)); } + configurator.configurations.UpdateLayers(configurator.layers); + std::string last_layers_path = configurator.layers.last_layers_path.AbsolutePath(); if (!configurator.Get(HIDE_MESSAGE_NOTIFICATION_LAYERS_LOADED)) {