From 2933de5d2fbd4a84a29bfab6d654cbaca59995ee Mon Sep 17 00:00:00 2001 From: Gary Burton Date: Sun, 27 Feb 2011 21:31:54 +0000 Subject: [PATCH] Load button on debug only. Bug 4704 svn: r16726 --- src/gui/plug/_windows.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/gui/plug/_windows.py b/src/gui/plug/_windows.py index 8abc8306c..5fbb1cf03 100644 --- a/src/gui/plug/_windows.py +++ b/src/gui/plug/_windows.py @@ -513,11 +513,12 @@ class PluginStatus(ManagedWindow.ManagedWindow): self.__populate_reg_list() def cursor_changed(self, obj): - selection = obj.get_selection() - model, node = selection.get_selected() - if node: - data = model.get_value(node, 3) - self.__load_btn.set_sensitive(data is not None) + if __debug__: + selection = obj.get_selection() + model, node = selection.get_selected() + if node: + data = model.get_value(node, 3) + self.__load_btn.set_sensitive(data is not None) def button_press(self, obj, event): """ Callback function from the user clicking on a line """