From f5aba24ddf2a3c28387fa6d3ffa9a987af6349c2 Mon Sep 17 00:00:00 2001 From: trigg Date: Mon, 3 Apr 2023 18:35:24 +0100 Subject: [PATCH] - Create config sections in window placement if necessary --- discover_overlay/settings_window.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/discover_overlay/settings_window.py b/discover_overlay/settings_window.py index 5a20496..557fb86 100644 --- a/discover_overlay/settings_window.py +++ b/discover_overlay/settings_window.py @@ -644,6 +644,8 @@ class MainSettingsWindow(): config = ConfigParser(interpolation=None) config.read(self.config_file) + if not "main" in config.sections(): + config.add_section("main") config.set("main", "floating_x", "%s" % (int(self.voice_floating_x))) config.set("main", "floating_y", "%s" % @@ -689,6 +691,8 @@ class MainSettingsWindow(): config = ConfigParser(interpolation=None) config.read(self.config_file) + if not "text" in config.sections(): + config.add_section("text") config.set("text", "floating_x", "%s" % (int(self.text_floating_x))) config.set("text", "floating_y", "%s" %