From 4331c59518db95a5a020c37f6b9a809b085ee907 Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Mon, 1 May 2023 11:15:23 +0200 Subject: gui: warn about duplicate buttons, then ignore them --- gui.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gui.py b/gui.py index 232882c..33c8d6d 100644 --- a/gui.py +++ b/gui.py @@ -75,6 +75,9 @@ class PyATEMSwitcherGui(): break if i.shortName.lower() in ('-', 'empty', 'x'): continue + if f'in_{i.shortName}' in self.buttons: + log.warning(f'ignoring duplicate button {i.shortName)') + continue log.debug(f'Creating Button for {i.shortName} of type {i.externalPortType}: {i.longName}') btn = Gtk.Button.new_with_label( i.longName -- cgit v1.2.3