From 3e715826455ee460d242d85b2c32676fe6088505 Mon Sep 17 00:00:00 2001 From: Stephen Hurd Date: Sat, 24 Jun 2023 02:12:01 -0400 Subject: [PATCH] Properly indent sub-groups in RadioSettingGroup.__str__ Previously, sub-groups would all have headers/footers left aligned and all options would start with a single tab, making it hard to understand a settings list with nested groups. This adds a tab for each level of nesting. --- chirp/settings.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/chirp/settings.py b/chirp/settings.py index 3f5c4a298..76ef87240 100644 --- a/chirp/settings.py +++ b/chirp/settings.py @@ -355,7 +355,8 @@ def set_doc(self, doc): def __str__(self): string = "group '%s': {\n" % self._name for element in sorted(self._elements.values()): - string += "\t" + str(element) + "\n" + for line in str(element).split("\n"): + string += "\t" + line + "\n" string += "}" return string