From 92d62fb25859abffad150fe1d4c37d01fcb84dd6 Mon Sep 17 00:00:00 2001 From: Fabian Fichter Date: Thu, 11 Mar 2021 23:12:46 +0100 Subject: [PATCH] Add variant reinitialization on protocol change This ensures reinitialization of PSQT when changing the default variant by switching the protocol via usi/ucci. No functional change for UCI and CECP usage. --- src/ucioption.cpp | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/src/ucioption.cpp b/src/ucioption.cpp index d75c7fd..7b78f57 100644 --- a/src/ucioption.cpp +++ b/src/ucioption.cpp @@ -350,6 +350,9 @@ void Option::set_combo(std::vector newComboValues) { void Option::set_default(std::string newDefault) { defaultValue = currentValue = newDefault; + + if (on_change) + on_change(*this); } const std::string Option::get_type() const { -- 1.7.0.4