From 7617a1ef8ea40d74293a98a7474a1a4b23ddfbeb Mon Sep 17 00:00:00 2001 From: Daniel Pavel Date: Wed, 12 Dec 2012 20:56:13 +0200 Subject: [PATCH] don't look at a device's settings if they aren'y being displayed avoids unnecessary hid++ calls from the main thread --- app/ui/config_panel.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/ui/config_panel.py b/app/ui/config_panel.py index b3859a87..e9d2c905 100644 --- a/app/ui/config_panel.py +++ b/app/ui/config_panel.py @@ -155,12 +155,12 @@ def update(frame): box.foreach(lambda x, _: box.remove(x), None) return - if not device.settings: - # nothing to do here + if not box.get_visible(): + # no point in doing this right now, is there? return - if not box.get_visible(): - # no point in doing this, is there? + if not device.settings: + # nothing to do here return force_read = False