From 864d9e9ab10e527963cbb8cfbe4595dc925dc67b Mon Sep 17 00:00:00 2001 From: Patrick Dulebohn Date: Thu, 21 Dec 2023 15:54:37 -0500 Subject: [PATCH] Add Hazado's suggestions that actually work --- Scripts/Python/xLinkingBookGUIPopup.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Scripts/Python/xLinkingBookGUIPopup.py b/Scripts/Python/xLinkingBookGUIPopup.py index ba79b2d4c1..7d7dcf4018 100644 --- a/Scripts/Python/xLinkingBookGUIPopup.py +++ b/Scripts/Python/xLinkingBookGUIPopup.py @@ -527,11 +527,7 @@ def IShowBookNoTreasure(self): gLinkingBook = ptBook(bookdef,self.key) gLinkingBook.setSize( width, height ) # make sure there is a cover to show - if not showOpen and not self.IsThereACover(bookdef): - showOpen = 1 - elif showOpen and not self.IsThereACover(bookdef): - showOpen = 1 - else: + if showOpen and self.IsThereACover(bookdef): showOpen = 0 gLinkingBook.setGUI(gui) gLinkingBook.show(showOpen) @@ -867,7 +863,7 @@ def IAddShare(self): def IsThereACover(self,bookHtml): # search the bookhtml string looking for a cover idx = bookHtml.find(' 0: + if idx >= 0: return 1 return 0