|
|
#16 |
|
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() Posts: 404
Karma: 518
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6 & HD8
|
Trying the new build provided by DNSB on Windows 11, and all now seems good in whichever order the existing file is added.
Thanks everyone. |
|
|
|
|
|
#17 |
|
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,947
Karma: 7500000
Join Date: Nov 2009
Device: many
|
Glad to hear it.
|
|
|
|
| Advert | |
|
|
|
|
#18 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 29,665
Karma: 212342344
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I'm thinking we might want to give the same treatment to CreateEmptyHTMLFile() in Book.cpp.
I haven't had a chance to test it. But just eyeballing the code in Book.cpp looks like the same kind of thing could happen when there's a user xhtml template in play. There's different stuff going on with AddNewHTML in BookBrowser.cpp, however, so it may not be necessary, but I'm throwing it out just case. Last edited by DiapDealer; 08-16-2026 at 12:52 PM. |
|
|
|
|
|
#19 |
|
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,947
Karma: 7500000
Join Date: Nov 2009
Device: many
|
I thought about that one too. It can not hurt. It all depends on how setText is implemented in the HTML or XML ResourceObjects, I think. I will take a peek at the code.
|
|
|
|
|
|
#20 |
|
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,947
Karma: 7500000
Join Date: Nov 2009
Device: many
|
SetText in HTMLResource invokes it in XMLResource which inherits it from TextResource (which is where CSS Resources inherit it from).
So yes, I think after setting the template or blank data, we should use the same fix for the created htmlresource. So good catch! |
|
|
|
| Advert | |
|
|
|
|
#21 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 29,665
Karma: 212342344
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I just tested it and it doesn't seem to suffer from the same problem. Not sure where its contents might get flushed to disk, but it doesn't seem to erase the template contents like the other test case did. But it couldn't hurt to add it just in case.
|
|
|
|
|
|
#22 |
|
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,947
Karma: 7500000
Join Date: Nov 2009
Device: many
|
Please add it, as I have no idea where it does get flushed to disk and it can not hurt.
|
|
|
|
|
|
#23 |
|
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,947
Karma: 7500000
Join Date: Nov 2009
Device: many
|
All of this separation of getting and setting text vs reading and writing to the file was done purely for speed on the initial load of an epub, because tidy SourceUpdates were used to force everything into standard form on loading an epub, they never wrote the initial file to disk to save time as it would later be read in, links updated, and then finally written to disk.
We dropped that long ago and reverted to unpacking the existing epub directly and not trying to force changes onto the files as tidy broke many things. It still helps with speed, but before any save or plugin, we have to remember to flush all changes to disk. Last edited by KevinH; 08-16-2026 at 01:33 PM. |
|
|
|
|
|
#24 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 29,665
Karma: 212342344
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
|
|
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Unexpected Missing Generic Font Family (Style Sheet.css) | Seth H | Editor | 3 | 09-29-2024 08:49 AM |
| Crazy style sheet | jiembe | Editor | 10 | 12-20-2020 07:48 PM |
| Style Sheet entry for a 'hanging' style | AThirstyMind | Kindle Formats | 6 | 12-10-2016 12:28 AM |
| Print style sheet | ronaldl | Sigil | 2 | 10-29-2012 04:32 PM |
| Missing style sheet | mauvais | Barnes & Noble NOOK | 3 | 12-05-2011 06:29 PM |