Skip to content

Commit

Permalink
vkconfig3: Fix layer settings export chechbox
Browse files Browse the repository at this point in the history
  • Loading branch information
christophe-lunarg committed Dec 4, 2024
1 parent 4860024 commit 32d60b8
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions vkconfig_core/configuration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,9 @@ bool Configuration::Load(const Path& full_path, const LayerManager& layers) {
if (json_layer_object.value("type") != QJsonValue::Undefined) {
parameter.type = GetLayerType(json_layer_object.value("type").toString().toStdString().c_str());
}
if (json_layer_object.value("override_settings") != QJsonValue::Undefined) {
parameter.override_settings = json_layer_object.value("override_settings").toBool();
}

const Layer* layer = layers.Find(parameter.key, parameter.api_version);

Expand Down Expand Up @@ -264,6 +267,7 @@ bool Configuration::Save(const Path& full_path) const {
json_layer.insert("manifest", parameter.manifest.RelativePath().c_str());
}
SaveStringArray(json_layer, "platforms", GetPlatformTokens(parameter.platform_flags));
json_layer.insert("override_settings", parameter.override_settings);

QJsonArray json_settings;
for (std::size_t j = 0, m = parameter.settings.size(); j < m; ++j) {
Expand Down
2 changes: 1 addition & 1 deletion vkconfig_core/version.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const Version Version::VKCONFIG(3, 0, 0);
const Version Version::VKHEADER(VK_HEADER_VERSION_COMPLETE);
const Version Version::NONE(0, 0, 0);
const Version Version::LATEST(~0, ~0, ~0);
const Version Version::REQUIRED_LOADER_VERSION(1, 3, 302);
const Version Version::REQUIRED_LOADER_VERSION(1, 3, 301);

const char *VKCONFIG_NAME = "Vulkan Configurator";
const char *VKCONFIG_SHORT_NAME = "vkconfig";
Expand Down
2 changes: 1 addition & 1 deletion vkconfig_gui/settings_tree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ void SettingsTreeManager::CreateGUI() {

this->ui->configurations_group_box_settings->blockSignals(true);
this->ui->configurations_group_box_settings->setTitle(format("%s:", title.c_str()).c_str());
this->ui->configurations_group_box_settings->setCheckable(configurator.advanced);
this->ui->configurations_group_box_settings->setCheckable(configurator.HasEnabledUI(ENABLE_UI_SETTINGS));
this->ui->configurations_group_box_settings->setChecked(parameter->override_settings);
this->ui->configurations_group_box_settings->blockSignals(false);
this->ui->configurations_presets->setVisible(!layer->presets.empty());
Expand Down
4 changes: 2 additions & 2 deletions vkconfig_gui/tab_configurations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,8 @@ void TabConfigurations::UpdateUI_Settings(UpdateUIMode mode) {
this->ui->configurations_group_box_settings->setToolTip(tooltip.c_str());
}

this->ui->configurations_group_box_settings->setEnabled(configurator.HasEnabledUI(ENABLE_UI_SETTINGS));
this->ui->configurations_group_box_settings->setCheckable(configurator.HasEnabledUI(ENABLE_UI_SETTINGS));
//this->ui->configurations_group_box_settings->setEnabled(configurator.HasEnabledUI(ENABLE_UI_SETTINGS));
//this->ui->configurations_group_box_settings->setCheckable(configurator.HasEnabledUI(ENABLE_UI_SETTINGS));
}

void TabConfigurations::UpdateUI(UpdateUIMode ui_update_mode) {
Expand Down

0 comments on commit 32d60b8

Please sign in to comment.