Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 01-02-2019, 10:56 PM   #1
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
Bug: Tabs Closing While Link Stylesheets

Explanation

When you have multiple tabs open + Link Stylesheets, non-active tabs close.

Steps to Reproduce

Step 1: Open attached EPUB.

Step 2: Open all 3 HTML files. Make sure to make one of the files your active tab. For example, Chapter03.xhtml.
  • Chapter01.xhtml open
  • Chapter02.xhtml open
  • Chapter03.xhtml open and is the active tab.

Step 3: In the Book Browser, Shift-Click all HTML files + Right-Click and select Link Stylesheets:

Click image for larger version

Name:	Sigil.Link.Stylesheets.Bug.Step3.4.png
Views:	144
Size:	31.9 KB
ID:	168797

Step 4: Link the stylesheet and press OK.

Bug: All tabs close, and only Chapter03.xhtml is left open.

If you have all 3 chapters + stylesheets.css open, the CSS tab also survives. So this bug seems to only close all non-active HTML files.

Repeat Steps 1-4, but make sure stylesheets.css is open as your active tab. That'll be the only tab that survives.

Expected Results

No tabs close.
Attached Files
File Type: epub LinkStylesheetBug.epub (2.7 KB, 103 views)
Tex2002ans is offline   Reply With Quote
Old 01-03-2019, 03:47 AM   #2
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
I was able to reproduce this bug with Windows 10 and Arch Linux (Qt 5.12.0; Sigil built from source).
Doitsu is offline   Reply With Quote
Advert
Old 01-03-2019, 08:57 AM   #3
Banjo
Zealot
Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!
 
Banjo's Avatar
 
Posts: 120
Karma: 5276
Join Date: Feb 2013
Device: Asus Zen Pad
I was able to reproduce this on Mageia 7 beta with Sigil 0.9.10 from their repository.
Banjo is offline   Reply With Quote
Old 01-03-2019, 02:34 PM   #4
JustinThought
Groupie
JustinThought ought to be getting tired of karma fortunes by now.JustinThought ought to be getting tired of karma fortunes by now.JustinThought ought to be getting tired of karma fortunes by now.JustinThought ought to be getting tired of karma fortunes by now.JustinThought ought to be getting tired of karma fortunes by now.JustinThought ought to be getting tired of karma fortunes by now.JustinThought ought to be getting tired of karma fortunes by now.JustinThought ought to be getting tired of karma fortunes by now.JustinThought ought to be getting tired of karma fortunes by now.JustinThought ought to be getting tired of karma fortunes by now.JustinThought ought to be getting tired of karma fortunes by now.
 
JustinThought's Avatar
 
Posts: 171
Karma: 3517858
Join Date: May 2016
Location: Monterrey, Mexico
Device: Samsung Tab-3 7"
Windows 7, standard Sigil distribution, joined the #Me-Too movement. Interestingly enough, the first time I followed the steps, but un-linking the books, only 1 tab closed, and the other two stayed open. But I haven't been able to duplicate that.
JustinThought is offline   Reply With Quote
Old 01-03-2019, 06:12 PM   #5
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
I am away travelling but I will look into fixing this once I return unless DiapDealer beats me to it
KevinH is offline   Reply With Quote
Advert
Old 01-03-2019, 06:17 PM   #6
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by JustinThought View Post
Interestingly enough, the first time I followed the steps, but un-linking the books, only 1 tab closed, and the other two stayed open. But I haven't been able to duplicate that.
It seems like it only closes tabs that are actually selected to Link Stylesheets.

So let's say all 3 chapters are opened + Chapter03 is active.

If you highlight Chapter01 and Link Stylesheets, Chapter01 tab closes. Chapter02 + 03 tabs remain open.
Tex2002ans is offline   Reply With Quote
Old 01-03-2019, 07:00 PM   #7
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
This sounds familiar. Bit I can't quite put my finger on it. I just know I've worked on "closing tabs", and linking either multiple stylesheets (or linking a stylesheet to multiple html files). I'll try to find it and see if they're related.

Has anyone determined if this is new to 0.9.10, or was it present in 0.9.9 or earlier?

Last edited by DiapDealer; 01-03-2019 at 07:07 PM.
DiapDealer is offline   Reply With Quote
Old 01-03-2019, 07:07 PM   #8
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,095
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
This was brought up before...I don't have the link. I thought it had been traced to a QT bug??
Turtle91 is offline   Reply With Quote
Old 01-03-2019, 07:26 PM   #9
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I would expect a crash with a Qt bug. We close and reopen tabs all the time in various situations. Something must be firing a signal to close them, but the signal to open them back up is getting lost or dropped. Or the close signal itself is extraneous.
DiapDealer is offline   Reply With Quote
Old 01-04-2019, 03:57 PM   #10
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
This is not so much a "bug" as it is a conscious decision (albeit one not everyone is going to love) to close any html tabs that are being linked to the css files that are open (if one of them happens to be the current tab, it will be closed and reopened after) to prevent potential issues.

So the question becomes: is there a different way to avoid the potentially destructive consequences of leaving the tabs open while linking?

I'll see what I can see. Even if I reopen all html tabs that were closed, there's no way to guarantee all the tabs will be in the same order they were pre-linking.

Last edited by DiapDealer; 01-04-2019 at 04:05 PM.
DiapDealer is offline   Reply With Quote
Old 01-04-2019, 11:15 PM   #11
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
Hi

Archlinux Sigil 0.9.10. Qt 5.12.

Thank you for this interesting feature (linking a stylesheet) that I had not seen.

And yes, two tabs are closing as previously reported. The main thing however is that all three files can be linked at once to the stylesheet.
roger64 is offline   Reply With Quote
Old 01-14-2019, 04:20 PM   #12
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Hey @KevinH. Did you get a chance to look at this? I quickly found where Sigil is deliberately closing open html tabs (the ones that are being linked). The comments indicate it's being done so that Book View doesn't stomp on the modifications, but I'm not certain if that's still a concern or not. I thought maybe it could be a holdout from htmlTidy days. What are your thoughts? At the very least, I'm thinking a test to see whether BookView is even active before closing the tabs might be in order.
DiapDealer is offline   Reply With Quote
Old 01-14-2019, 05:09 PM   #13
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
Haven't looked at it yet. Which file has the code that deliberately closes the tabs when linking stylesheets?
KevinH is offline   Reply With Quote
Old 01-14-2019, 06:53 PM   #14
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by KevinH View Post
Which file has the code that deliberately closes the tabs when linking stylesheets?
Right. Sorry. It's in the LinkStylesheetsToResources function in MainUI/MainWindow.cpp. Down around line 2188.
DiapDealer is offline   Reply With Quote
Old 01-14-2019, 07:42 PM   #15
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
Wow, according to blame those lines were added way back in June of 2012. I think we should at least check to see if any of the open tabs are in BV mode before closing anything except for the current tab which we then reopen.

How does that sound?
KevinH is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Unifying stylesheets roger64 ePub 6 08-22-2016 06:29 PM
Help with stylesheets in Calibre hikerguy Editor 8 04-01-2015 02:30 AM
Stylesheets Phylis Sophical Sigil 10 10-28-2014 03:56 PM
Alternate stylesheets Jellby ePub 1 08-19-2011 06:44 PM


All times are GMT -4. The time now is 09:12 PM.


MobileRead.com is a privately owned, operated and funded community.