From af2f730816d3acdeca1c1b32334607a33002925d Mon Sep 17 00:00:00 2001 From: Joe R Date: Tue, 6 Feb 2024 23:38:13 -0500 Subject: [PATCH] Removed limit on number of pause/demo text images loaded per style. --- pysollib/app.py | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/pysollib/app.py b/pysollib/app.py index e02384d4..eefa12b1 100644 --- a/pysollib/app.py +++ b/pysollib/app.py @@ -545,19 +545,30 @@ class Application: self.gimages.redeal.append(self.dataloader.findImage(f, dirname)) dirname = os.path.join("images", "demo", self.opt.demo_logo_style) self.gimages.demo = [] - for f in ("demo01", "demo02", "demo03", "demo04", "demo05",): + foundall = False + count = 0 + while not foundall: + count += 1 try: - self.gimages.demo.append(self.dataloader.findImage(f, dirname)) + self.gimages.demo.append(self.dataloader.findImage("demo" + + ("%02d" % + (count,)), + dirname)) except OSError: - pass + foundall = True dirname = os.path.join("images", "pause", self.opt.pause_text_style) self.gimages.pause = [] - for f in ("pause01", "pause02", "pause03",): + foundall = False + count = 0 + while not foundall: + count += 1 try: - self.gimages.pause.append(self.dataloader.findImage(f, + self.gimages.pause.append(self.dataloader.findImage("pause" + + ("%02d" % + (count,)), dirname)) except OSError: - pass + foundall = True # dirname = os.path.join("images", "stats") # for f in ("barchart",): # self.gimages.stats.append(self.dataloader.findImage(f, dirname))