![]() |
#61 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,373
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
The sgc-toc.css being present in the Preferences folder definitely changes what "Create HTML Table of Contents" does; so it doesn't surprise me that it being there has an impact this series of steps.
|
![]() |
![]() |
![]() |
#62 | |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,493
Karma: 5703586
Join Date: Nov 2009
Device: many
|
Quote:
The following patch fixed the bug for me but I do not have a recent 0.8.4 tree sitting around to test with. My version of Sigil is based on my git master and it is much different from Sigil 0.8.4. So DiapDealer (or anyone else who builds their own), if you get a free moment and have a 0.8.4 tree around someplace, please try the following patch and see if it fixes the bug for you. Code:
--- src/Sigil/MainUI/BookBrowser.cpp~ 2015-02-28 16:48:28.000000000 -0500
+++ src/Sigil/MainUI/BookBrowser.cpp 2015-03-25 13:16:19.000000000 -0400
@@ -638,7 +638,11 @@
}
} else {
// TODO: adding a CSS file should add the referenced fonts too
- m_Book->GetFolderKeeper().AddContentFileToFolder(filepath);
+ Resource & resource = m_Book->GetFolderKeeper().AddContentFileToFolder(filepath);
+ if (resource.Type() == Resource::CSSResourceType) {
+ CSSResource *css_resource = qobject_cast<CSSResource *> (&resource);
+ css_resource->InitialLoad();
+ }
}
added_files.append(filepath);
This would have been done for you if you used the Tab to open the new .css file and changed it. It is always done for every css file for that is imported by loading an epub. But the AddExisting path did not do this, which is what caused the bug. I still haven't figured out how the Create HTML TOC impacts this but I think this should do the trick since it makes the newly added css file act just like one loaded from an original epub. Last edited by KevinH; 03-25-2015 at 01:36 PM. |
|
![]() |
![]() |
Advert | |
|
![]() |
#63 |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,318
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Nice work Kevin!
|
![]() |
![]() |
![]() |
#64 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,373
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
|
![]() |
![]() |
![]() |
#65 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,493
Karma: 5703586
Join Date: Nov 2009
Device: many
|
Hi DiapDealer,
Wonderful news! I was worried it was a bug I introduced into my spring cleaning in Sigil master. Glad to hear the bug existed in Sigil 0.8.4 and can be fixed by that patch. We should probably wait awhile and release a Sigil 0.8.5 with any other bug fixes we have before starting the alpha Sigil 0.9.0 series. Thanks! KevinH |
![]() |
![]() |
Advert | |
|
![]() |
#66 | |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,493
Karma: 5703586
Join Date: Nov 2009
Device: many
|
Quote:
But if a call to SaveToDisk (such as doing a File->SaveAs) is made during that interval it will incorrectly read from the QTextDocument (which is empty because it was waiting to be loaded!) and writing it to disk resulting in the disappearing file. Technically it could happen to any text based resource (OPF, XHTML, CSS, etc) but initial loading was always done so all you were losing might have been the difference between it and its cache if anything at all. So I have made an additional change to try to close that tiny hole in Sigil master so we are not bitten by this. It was the same bug that made font url's not be properly updated in CSS files too. Thanks to all for reporting the bug so we could get this tracked down. Kevin Last edited by KevinH; 03-25-2015 at 03:35 PM. |
|
![]() |
![]() |
![]() |
#67 | |
Connoisseur
![]() Posts: 72
Karma: 10
Join Date: Nov 2012
Device: none
|
Quote:
This sounds like it explains everything I've reported, with the possible exception of the "file jumping" symptom, and that could simply be a resource issue associated with the conflicts you closed. I can't wait to test 8.5, whenever it's released. Congrats!!! |
|
![]() |
![]() |
![]() |
#68 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Sounds like very good bughunting and code knowledge. Very good job and it proves how important it is to be able to reproduce an error...
|
![]() |
![]() |
![]() |
#69 |
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Mar 2015
Device: Kindle
|
I'll try the workaround
Well, I'm glad to see other users have experienced this and that it's not unique to me or that I did something stupid like inadvertently gotten "confused between the source material you started with and the epub Sigil turns them into."
I have used Sigil for several years now (on over 50 books!) and never had this problem until the last couple of iterations, I haven't done anything different than I did in the past when the problem didn't exist. It's quite frustrating. But I will try the workaround of adding a space to the css next time. Seems like a weird solution, but I'll try anything. As a recap-- here is what happens: * I enter the html into the Sigil doc and link it to my css called georgia.css. Everything looks dandy * I insert an image file and the georgia.css formatting disappears even tho the georgia.css file is still in the Style file, and the linked stylesheet for each chapter is listed as georgia.css. So, I reinstall the georgia.css file and reset all the individual chapters. OR, sometimes, it's not even the insertion of an image file that causes this. Sometimes it just seems to happen randomly as I add another chapter. I am using the latest iteration of Sigil, and as I've said, this only started happening maybe 4 iterations ago. Previously it never happened and I was using the same CSS file, same processes. |
![]() |
![]() |
![]() |
#70 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,493
Karma: 5703586
Join Date: Nov 2009
Device: many
|
Hi,
Yes, simply opening the css file in a tab of its own (and adding a space or making a minor edit) will force an InitialLoad of the resource, which is what the patch changes. So that should do the trick to prevent the bug until a new release is made. At least for the disappearing css. The Create HTML TOC crash is something else and as far as I know there is no easy workaround. |
![]() |
![]() |
![]() |
#71 |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,318
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Hi,
I just wanted to let you know that this bug has crept in again...the CSS page disappearing... I'm thinking the patch wasn't included in one of the latest updates or something. It has an easy workaround, I just add the space to the CSS file on initial creation. I figure this has already been included in the next release, but wanted to make sure you were aware it is still there. Cheers! |
![]() |
![]() |
![]() |
#72 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,493
Karma: 5703586
Join Date: Nov 2009
Device: many
|
Is this with Sigil 0.8.5, Sigil 0.8.6 or Sigil 0.8.7?
If Sigil 0.8.7 then it could be caused by a late change in the Sigil 0.8.7 tree used for user_none's farewell release that broke many signals. If Sigil 0.8.5, my own bug fix broke a few things and this more correctly fixed in Sigil 0.8.6. KevinH |
![]() |
![]() |
![]() |
#73 |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,318
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
It is 8.7. I try and keep up with the latest and greatest!
|
![]() |
![]() |
![]() |
#74 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,493
Karma: 5703586
Join Date: Nov 2009
Device: many
|
The only change in Sigil 0.8.7 was changing the About info, and an attempt to work around illegal use of null references which ended up breaking many things. Fixing it would require backporting a huge set of reference to pointer changes all throughout Sigil master to the Sigil 0.8.x source tree.
So, I strongly recommend you stick with the Sigil 0.8.6 release. It was built with an older compiler that allowed null references to be passed around and therefore has no issues. I really should recall the Sigil 0.8.7 release given many things are broken in it. Take care, KevinH |
![]() |
![]() |
![]() |
#75 |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,318
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
I just had the same thing happen in 8.6....although it could be the way I "downgraded", "ungraded", "went back"... I just installed 8.6 without uninstalling 8.7 (I didn't want to lose any settings, PIs, etc.) It seemed to overwrite the files and when I checked the version it said 8.6.... soooo..... I really don't want to be thought of as a computer ignoramous...so please tell me it's not my fault
![]() |
![]() |
![]() |
![]() |
Tags |
css changes |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
ADE breaks CSS --> CSS Validation: Parse Error / Value Error | dasboeh | ePub | 4 | 12-10-2012 03:25 AM |
Override ePub CSS with userStyle.css? | barium | Sony Reader Dev Corner | 11 | 07-16-2011 03:25 PM |
CSS Help Please | Japes | Calibre | 21 | 06-23-2011 05:05 PM |
epub CSS versus "Regular" CSS | konrad | ePub | 4 | 02-18-2011 09:29 AM |
css pseudo elements and adjacent combinators in extra css? | ldolse | Calibre | 2 | 12-21-2010 05:09 PM |