From e224a015dbb69db35a9403f40ede7fc397d549fc Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Tue, 21 Jan 2025 09:25:46 +0100 Subject: Fixed ConfigOptionChanged events With the statically typed config we no longer get an event for each changed config value. Where relevant, this is now done through `setConfigValue`. The `Event` now uses a `std::any`, which for `ConfigOptionChanged` events is set to the changed `Config` member. This allows for a type-safe check on which config value was changed. --- src/gui/gui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gui/gui.cpp') diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 39314fcf..a59242dc 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -177,7 +177,7 @@ void Gui::event(Event::Channel channel, const Event &event) if (channel == Event::ConfigChannel) { if (event.getType() == Event::ConfigOptionChanged && - event.getString("option") == "customcursor") + event.hasValue(&Config::customCursor)) { setUseCustomCursor(config.customCursor); } -- cgit v1.2.3-70-g09d2