| 1348 | void TabConfigurations::on_configurations_list_itemChanged(QListWidgetItem *item) { this->OnRenameConfiguration(item); } |
| 1349 | |
| 1350 | void TabConfigurations::UpdatePerExecutableConfigurations() { |
| 1351 | Configurator &configurator = Configurator::Get(); |
| 1352 | if (configurator.GetExecutableScope() != EXECUTABLE_PER) { |
| 1353 | return; |
| 1354 | } |
| 1355 | |
| 1356 | Configuration *configuration = configurator.GetActiveConfiguration(); |
| 1357 | if (configuration == nullptr) { |
| 1358 | return; |
| 1359 | } |
| 1360 | |
| 1361 | std::vector<Path> updated_executable_paths; |
| 1362 | if (configurator.executables.UpdateConfigurations(updated_executable_paths)) { |
| 1363 | if (!configurator.Get(HIDE_MESSAGE_NOTIFICATION_PER_CONFIG_UPDATE)) { |
| 1364 | QMessageBox message; |
| 1365 | message.setWindowTitle("Vulkan Executable Layers Configuration Updated"); |
| 1366 | message.setText( |
| 1367 | format("Per Executable Layers Configuration Scope requires that all executables with the same working " |
| 1368 | "directory use the same layers configuration. The following executables were switch to '%s' configuration:", |
| 1369 | configuration->key.c_str()) |
| 1370 | .c_str()); |
| 1371 | std::string informative; |
| 1372 | for (std::size_t i = 0, n = updated_executable_paths.size(); i < n; ++i) { |
| 1373 | informative += format("- %s\n", updated_executable_paths[i].RelativePath().c_str()); |
| 1374 | } |
| 1375 | |
| 1376 | message.setInformativeText(informative.c_str()); |
| 1377 | message.setIcon(QMessageBox::Warning); |
| 1378 | message.setCheckBox(new QCheckBox("Do not show again.")); |
| 1379 | message.exec(); |
| 1380 | |
| 1381 | if (message.checkBox()->isChecked()) { |
| 1382 | configurator.Set(HIDE_MESSAGE_NOTIFICATION_PER_CONFIG_UPDATE); |
| 1383 | } |
| 1384 | } |
| 1385 | } |
| 1386 | } |
| 1387 | |
| 1388 | void TabConfigurations::on_configurations_list_currentRowChanged(int currentRow) { |
| 1389 | this->_settings_tree_manager.CleanupGUI(); |
no test coverage detected