From 7cd34fb59a59bda3485d3a5b6b43cda443486132 Mon Sep 17 00:00:00 2001 From: "Christian T. Jacobs" Date: Tue, 21 Feb 2017 17:57:32 +0000 Subject: [PATCH] Fix re-drawing of grey line on tab change. --- bin/pyqso | 14 ++------------ pyqso/toolbox.py | 4 ++-- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/bin/pyqso b/bin/pyqso index 8eacfc8..24529a8 100755 --- a/bin/pyqso +++ b/bin/pyqso @@ -93,21 +93,11 @@ class PyQSO: # once connected to the SQLite database. self.logbook = Logbook(self) self.toolbox = Toolbox(self, self.builder) + + # Set up menu and tool bars. These classes depend on the Logbook and Toolbox class. self.menu = Menu(self, self.builder) - - - # Set up menu and tool bars - # These classes depend on the Logbook and Toolbox class, - # so pack the logbook and toolbox after the menu and toolbar. - #self.toolbar = Toolbar(self) - #vbox_outer.pack_start(self.menu, False, False, 0) - #vbox_outer.pack_start(self.toolbar, False, False, 0) - #vbox_outer.pack_start(self.logbook, True, True, 0) - #vbox_outer.pack_start(self.toolbox, True, True, 0) - #vbox_outer.pack_start(self.statusbar, False, False, 0) - if(have_config): if(config.get("general", "show_toolbox") == "False"): self.toolbox.toggle_visible_callback() diff --git a/pyqso/toolbox.py b/pyqso/toolbox.py index ba5c084..8496555 100644 --- a/pyqso/toolbox.py +++ b/pyqso/toolbox.py @@ -58,6 +58,6 @@ class Toolbox: def _on_switch_page(self, widget, label, new_page): """ Re-draw the Grey Line if the user switches to the grey line tab. """ - if(label.get_text() == "Grey Line"): - label.draw() # Note that 'label' is actually a GreyLine object. + if(widget.get_tab_label(label).get_text() == "Grey Line"): + self.grey_line.draw() return