Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 09-29-2018, 07:47 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
[2 Bugs] + [Enhancement] Book Browser, CSS, URLs, Oh My!

I attached an example EPUB at the end of this post.

Sigil 0.9.10.
Windows 10, 64-bit.

Bug #1 (Book Browser)

Explanation

Use Ctrl+Click to highlight multiple files (with a gap in between, not consecutive files).

Drag/Drop to new location.

Only first file moves. The others stay exactly where they were.

Steps to Reproduce

Step 1. Ctrl+Click Section0002.xhtml + Section0004.xhtml in the Book Browser:

Click image for larger version

Name:	SigilBug1Step1.png
Views:	152
Size:	10.8 KB
ID:	166580

Code:
- Section0001.xhtml
- Section0002.xhtml <--- Ctrl+Click
- Section0003.xhtml
- Section0004.xhtml <--- Ctrl+Click
Step 2. Drag/Drop before Section0001.xhtml:

Click image for larger version

Name:	SigilBug1Step2.png
Views:	140
Size:	16.1 KB
ID:	166581

Get:

Code:
- Section0002.xhtml <--- Moved
- Section0001.xhtml
- Section0003.xhtml
- Section0004.xhtml <--- Didn't move
Expected:

Code:
- Section0002.xhtml
- Section0004.xhtml
- Section0001.xhtml
- Section0003.xhtml
Bug #2 (CSS Delete)

Explanation

Only 1 out of 2 CSS files delete when a file is open in Book View.

Note #1: This doesn't seem to effect Code View.

Note #2: This only occurs when the HTML file has multiple CSS files attached to it. (?) (See Section0004.xhtml, only 1 of the stylesheets are linked. Bug does not occur.)

Steps to Reproduce

Step 1. Have Book View open on Section0001.xhtml.

Step 2. Shift+Click to highlight both CSS files. Right-Click + Delete:

Click image for larger version

Name:	SigilBug2Step2.png
Views:	158
Size:	28.0 KB
ID:	166582

Step 3. In the Delete menu, make sure both checkboxes are set and push "Delete marked files":

Click image for larger version

Name:	SigilBug2Step3.png
Views:	142
Size:	4.2 KB
ID:	166583

Only stylesheet1.css will delete.

Potential Enhancement (Open/Copy Link)

Would be helpful if a link could be right-clickable in the Preview/Book View, then get an "Open Link" + "Copy Link"...

Like in Firefox/Chrome:

Click image for larger version

Name:	FirefoxRightClick.png
Views:	149
Size:	6.9 KB
ID:	166586

This would allow you to copy/paste links easily.

In Sigil, you can only left-click the link to open in your default browser.

And if you right-click, all that appears in the menu is "Inspect Element":

Click image for larger version

Name:	SigilRightClickLink.png
Views:	142
Size:	5.2 KB
ID:	166584

Why This Would Be Helpful

I was recently working on a book with 1000+ URLs. I was testing a lot of them in the Book View, and it would have been nice to copy/paste links.
Attached Files
File Type: epub Sigil.Book.Browser.Bug.Examples.epub (3.3 KB, 152 views)
Tex2002ans is offline   Reply With Quote
Old 09-29-2018, 11:52 PM   #2
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,645
Karma: 5433388
Join Date: Nov 2009
Device: many
Bug number 1 can not be recreated on Mac OSX at all. This generally means the bug is in Qt someplace. BTW, your bug 1is almost identical to an earlier bug report that turned out to be KDE / Qt related. I will look at your second bug when I get a free moment later tomorrow.
KevinH is offline   Reply With Quote
Advert
Old 09-30-2018, 03:19 AM   #3
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
Quote:
Originally Posted by KevinH View Post
Bug number 1 can not be recreated on Mac OSX at all.
I was able to reproduce bug number 1 on my 64bit Arch Linux machine. (Sigil built from source yesterday, Qt 5.11.2.)

(I wasn't able to reproduce the second bug on my Linux machine.)

Last edited by Doitsu; 09-30-2018 at 03:31 AM.
Doitsu is offline   Reply With Quote
Old 09-30-2018, 06:59 AM   #4
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,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Interesting results when testing bug #1 on my Windows/Linux machines: I get different results when dragging the selected files down rather than up. Looks like a Qt bug for sure. Luckily, reordering non-contiguous blocks of files isn't something most users are likely to attempt.

I also couldn't duplicate #2 in my preliminary testing.
DiapDealer is offline   Reply With Quote
Old 09-30-2018, 11:37 AM   #5
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 DiapDealer View Post
Interesting results when testing bug #1 on my Windows/Linux machines: I get different results when dragging the selected files down rather than up. Looks like a Qt bug for sure.
lol, and looks like all different results on Windows/Mac/Linux too!

Quote:
Originally Posted by DiapDealer View Post
Luckily, reordering non-contiguous blocks of files isn't something most users are likely to attempt.
Due to previous discussion on not being able to overwrite HTML files... I've been having to drag/drop lots of new front/backmatter in these books!

Add Existing Files adds them to the very end, alphabetically... so I've been having to drag stuff like:

Before:

Code:
- cover.xhtml
- Chapter01.xhtml
- [...]
- EndBook.xhtml
- copyright.xhtml <---
- newbackmatter.xhtml
- newbackmatter2.xhtml
- titlepage.xhtml <---
After:

Code:
- cover.xhtml
- titlepage.xhtml <---
- copyright.xhtml <---
- Chapter01.xhtml
- [...]
- EndBook.xhtml
- newbackmatter.xhtml
Bug #1 made this much more painful.

At least one good thing came out of not being able to overwrite... I found these bugs!
Tex2002ans is offline   Reply With Quote
Advert
Old 09-30-2018, 01:41 PM   #6
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,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I've tracked bug #1 down to my commit for fixing the cosmetic disappearing icons when reordering files in Book Browser (Linux/Windows only).

Reverting the change alleviates the issue of reordering multiple (but non-contiguous) files in Book Browser. If I can't find a solution that will accommodate both, I'll revert the cosmetic fix and some people will have to deal with disappearing icons after drag and drop operations.

I have some ideas and leads to follow up on, so hopefully I can find a unifying fix.
DiapDealer is offline   Reply With Quote
Old 10-01-2018, 09:33 AM   #7
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,645
Karma: 5433388
Join Date: Nov 2009
Device: many
FWIW, I was wrong about Bug 1 not existing on a Mac.. I dragged down and not up. I tried again by dragging up and sure enough section 4 was not properly moved.

So this bug does exist on Mac OS X as well.
KevinH is offline   Reply With Quote
Old 10-01-2018, 09:40 AM   #8
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,645
Karma: 5433388
Join Date: Nov 2009
Device: many
Okay, I finally got a chance to test Bug 2 on my Mac dev machine. This time I followed the instructions to the letter. I can not recreate Bug 2 at all. Every time I tried, both CSS files were deleted and only Section 1 was showing in BookView according to the instructions.

This is with my dev machine which has been updated to Qt 5.11.x in preparation for a future release. Perhaps this is a bug that exists in Qt 5.6.2 that has been fixed in Qt 5.11.x.
KevinH is offline   Reply With Quote
Old 10-01-2018, 05:27 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,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by KevinH View Post
Okay, I finally got a chance to test Bug 2 on my Mac dev machine. This time I followed the instructions to the letter. I can not recreate Bug 2 at all. Every time I tried, both CSS files were deleted and only Section 1 was showing in BookView according to the instructions.

This is with my dev machine which has been updated to Qt 5.11.x in preparation for a future release. Perhaps this is a bug that exists in Qt 5.6.2 that has been fixed in Qt 5.11.x.
I can't duplicate it with the stock Sigil 0.9.10 either. Both CSS files always delete as expected for me.
DiapDealer is offline   Reply With Quote
Old 10-02-2018, 11:07 AM   #10
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,645
Karma: 5433388
Join Date: Nov 2009
Device: many
So that pretty much leaves bug 1 to focus on. Your added Refresh reinitializes the entire model which is good except when it happens to be in the middle of multiple calls to remove rows and so loses the second dnd row movement. It only generates multiple calls because the files that were moved are non-contiguous.

So we either need to wait until all row removes are done and then Refresh (although I am not sure a signal exists from the model itself that will do that) or fire a signal that says run Refresh after a time delay, or try to manually fix the icon itself in the target rows be capturing the rowsAdded signal and manually filling in the proper icon in any new row.
KevinH is offline   Reply With Quote
Old 10-02-2018, 11:40 AM   #11
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,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by KevinH View Post
or try to manually fix the icon itself in the target rows be capturing the rowsAdded signal and manually filling in the proper icon in any new row.
This sounds like a good idea to me in theory (I'm away from the code at the moment). I could give this try later.

I really think this disappearing icon is a Qt bug, though. Does it happen on Mac? I know it used to happen on Linux, but I've not seen it in a while with later versions of Qt. Both columns really should be maintained via Qt's normal internal drag & drop, I think.

Last edited by DiapDealer; 10-02-2018 at 11:45 AM.
DiapDealer is offline   Reply With Quote
Old 10-02-2018, 11:47 AM   #12
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,645
Karma: 5433388
Join Date: Nov 2009
Device: many
Hi DiapDealer,

Please try what I just committed. It simply overwrites/rewrites the proper icon when rebuilding the HTML Reading Order as all of the info we need is there at that time and it is invoked right before your added Refresh() which I removed based on your messages here.

For me (Mac OSX, built from master just now, Qt 5.11.x) the icon now does not get lost during drag and drop and it seems to fix bug 1 as well.

Please let me know if it does the trick for Bug 1 for Linux and Windows if and when you get a chance.
KevinH is offline   Reply With Quote
Old 10-02-2018, 12:02 PM   #13
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,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
It's still building in Appveyor, but your change looks like it should work.
I should be able to try it after lunch sometime.
DiapDealer is offline   Reply With Quote
Old 10-02-2018, 12:59 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,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by KevinH View Post
Please let me know if it does the trick for Bug 1 for Linux and Windows if and when you get a chance.
So far, so good on Windows. No disappearing icons and multiple file moves (including non-contiguous) work as expected. I'll test on Linux later.

Your fix will probably be much more efficient, as well. A complete clearing/rebuilding of the entire model was included with the Refresh().
DiapDealer is offline   Reply With Quote
Old 10-02-2018, 02:58 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,645
Karma: 5433388
Join Date: Nov 2009
Device: many
Thanks. Good to know. And yes I agree that the lost icon bug when dragging and dropping is a Qt bug. But getting Qt to fix any bugs seems to be an impossible dream. I just had a serious use after free bug closed by Qt where they claimed they needed more info but my initial report included a step by step instructions to reproduce the bug using their own official QtCreator and even provided the resulting guard malloc backtrace.

You could not supply any more info period. No one ever even read the bug report or looked at it. I checked and the bug still exists. I can't even find my bug password any more to reopen the damn thing. Sad really. We do not need a Qt 5.12 or higher, we need a stable bug fixed 5.11 that actually gets fixes.

Oh well.
KevinH is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
bugs in book browser Reinhard Sigil 25 07-31-2018 02:07 PM
Possible Error / Enhancement - Book Editor, Spell Check Right-Click Sub-Menu WizkidTX Editor 7 07-22-2015 09:33 PM
PRS-T1 Two tiny bugs when reading a book opitzs Sony Reader 10 07-08-2013 07:10 PM
[Program Enhancement] Adding Empty Book Gunnerp245 Calibre 3 12-24-2012 07:32 AM
Enhancement (Delete formats from Book Details Panel) JohnnyBook Library Management 5 07-21-2012 08:17 AM


All times are GMT -4. The time now is 10:02 AM.


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