This commit is contained in:
marco
2020-06-27 20:24:13 +02:00
parent 47d61d3b2f
commit 5c4d07c7f9

View File

@@ -225,8 +225,6 @@ class SettingsWindow(xbmcgui.WindowXMLDialog):
c["control"].setVisible(val)
def evaluate_conditions(self):
import time
t = time.time()
for c in self.list_controls:
c["active"] = self.evaluate(self.list_controls.index(c), c["enabled"])
self.set_enabled(c, c["active"])
@@ -234,7 +232,6 @@ class SettingsWindow(xbmcgui.WindowXMLDialog):
if not c["show"]:
self.set_visible(c, c["show"])
self.visible_controls = [c for c in self.list_controls if c["show"]]
logger.info(time.time()-t)
def evaluate(self, index, cond):
import re
@@ -509,7 +506,6 @@ class SettingsWindow(xbmcgui.WindowXMLDialog):
elif c["type"] == 'text': self.add_control_text(c)
elif c["type"] == 'list': self.add_control_list(c)
elif c["type"] == 'label': self.add_control_label(c)
logger.info(time.time()-t)
self.list_controls = [c for c in self.list_controls if "control" in c]
self.evaluate_conditions()