From 43657440a3b28af5496c019038c6796e151703b9 Mon Sep 17 00:00:00 2001 From: Micke Nordin Date: Sat, 5 Jun 2021 23:21:23 +0200 Subject: [PATCH] Smol fix to make ghost labels dissapear --- main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index e479866..3fc5d45 100755 --- a/main.py +++ b/main.py @@ -88,14 +88,13 @@ class Hui(wx.Frame): """ self.SetTitle("Tinge - {}".format(self.cur_bridge.m_name)) bridge_btn: wx.Button = wx.Button(self.pnl, label="All Bridges") - group_label: wx.StaticText = wx.StaticText(self.pnl, label=" ⚯ Groups ⚯ ", style=wx.ALIGN_CENTER) - unattached_label: wx.StaticText = wx.StaticText(self.pnl, label=" ⚬ Unattached lights ⚬ ", style=wx.ALIGN_CENTER) has_unattached: bool = len(self.cur_bridge.unattached_lights) > 0 self.sizer.Add(bridge_btn, 0, wx.EXPAND) self.Bind(wx.EVT_BUTTON, lambda event: self.add_bridges(), bridge_btn) if has_unattached: + group_label: wx.StaticText = wx.StaticText(self.pnl, label=" ⚯ Groups ⚯ ", style=wx.ALIGN_CENTER) self.sizer.Add(group_label, 0, wx.EXPAND) for group in groups: inner_sizer: wx.BoxSizer = wx.BoxSizer(orient=wx.HORIZONTAL) @@ -114,6 +113,7 @@ class Hui(wx.Frame): lambda event, mgroupid=groupid: self.goto_group(mgroupid), group_btn) self.sizer.Add(inner_sizer, 0, wx.EXPAND) if has_unattached: + unattached_label: wx.StaticText = wx.StaticText(self.pnl, label=" ⚬ Unattached lights ⚬ ", style=wx.ALIGN_CENTER) self.sizer.Add(unattached_label, 0, wx.EXPAND) for light in self.cur_bridge.unattached_lights: inner_sizer = wx.BoxSizer(orient=wx.HORIZONTAL)