View Single Post
Old 05-04-2013, 08:06 AM   #36
meme
Sigil developer
meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.
 
Posts: 1,275
Karma: 1101600
Join Date: Jan 2011
Location: UK
Device: Kindle PW, K4 NT, K3, Kobo Touch
Quote:
Originally Posted by Hitch View Post
I have to say, it is not intuitive to me that Pretty Print would "clean" upon a switch from CV to BV. That's not something that I comprehended. After all, to my mind, that's not "open" or "save;" it's just a view switch. (Hmmm...I ponder, would it happen if you used the Preview from Code View? The PSO'D?).

I certainly have historically not set any type of auto-clean, but I see that in my latest upgrade to 0.7.1, it seems to be reset to auto-clean on open/save with PP. This certainly partly explains the issue,
After upgrading, it's best to check the cleaning options. With 0.7.2 if you have Open checked, then when you switch from Book View to Code View your code will be cleaned. This is because you are opening the code Book View created (Book View editing is provided by Qt, and Qt will not keep the same code layout you have in Code View).

Quote:
BUT....there's still something glitchy, because as I described, I never did have the opportunity to "manually clean" the missing tag. It was as I detailed, to the best of my recollection, and as it happened twice or so, I think I recall it reasonably well, given how many books have come since. ;-)
If you switch from Code View to Book View, then if the code is invalid, it should stop you from switching. Forcing the code to be valid before switching prevents losing text/tags.

The same should happen when saving an EPUB or opening an EPUB - you should be prompted that the file is invalid and that cleaning could cause data loss, although it will allow you to open/save an invalid file.

If, as has been suggested, you are not being prompted about invalid code when switching to Book View, then that's an issue. I haven't been able to reproduce it, but will try to look into it more to see how that might be possible.

I wonder if the prompt to manually or automatically clean should be removed anyway - so that if the code is invalid it will just refuse to switch to Book View. Though if the bug is that the prompt isn't triggering on an invalid file, it won't help much.
meme is offline   Reply With Quote