08-23-2023, 05:32 AM | #1 |
Connoisseur
Posts: 50
Karma: 10
Join Date: Apr 2021
Location: Spain
Device: Kobo Libra 2
|
What are the risks of drag/drop and in which cases?
I understand that with Sigil 2.0.0 the drag/drop function in text editing has been disabled and that it can be re-enabled by a certain environment variable, although there are some risks in doing so.
This function is very useful for me, because I often edit the text (not just the css) to correct mistranslations or add my own footnotes that I edit on the fly, and it is often enough for me to change the order of the elements of a sentence (the Spanish language is very flexible in this). In short, I have activated the environment variable SIGIL_ALLOW_CODEVIEW_DROP=1 but I would like to know more specifically what risks I am taking by doing so and in which cases. As I said, my movements are always of short fragments within the same sentence, and so far I haven't noticed anything happening to me. |
08-23-2023, 06:16 AM | #2 |
Grand Sorcerer
Posts: 27,596
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Unknown. It's unsupported.The risks are yours to figure out.
|
Advert | |
|
08-23-2023, 06:41 AM | #3 |
Evangelist
Posts: 483
Karma: 2267928
Join Date: Nov 2015
Device: none
|
A programming text editor that does not allow D&D is just absurd.
|
08-23-2023, 07:19 AM | #4 |
A Hairy Wizard
Posts: 3,119
Karma: 18727091
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 one author that I read is a GREAT storyteller… but can’t figure out commas to save his life! When I clean his books I am constantly dragging commas to their proper position (in code view). This is a lot faster to do by drag-n-drop with a mouse than manually typing and deleting.
Is this the kind of drag-n-drop that is disabled, or are you only referring to dragging code from some OTHER app/window and dropping into code view?? |
08-23-2023, 09:32 AM | #5 |
Sigil Developer
Posts: 7,727
Karma: 5444398
Join Date: Nov 2009
Device: many
|
Drag and drop according to the official Qt docs was supposed to be disabled by default. Sigil has been around a long time, long before Qt supported drag and drop at all without crashing. So this functionality was never used or tested in Sigil's CodeView.
Then silently, without changing their official docs, Qt turned ON drag and drop by default but it still could cause crashing in Qt 5.12.x and even Qt 5.15x. This crashing was finally reported to us, and since Sigil was never designed/tested to use drag and drop, we decided to revert to disabling it (as that was the original Qt default) as fixing internal Drag and Drop crashes deep in Qt are beyond our control. So with an environment variable set, you can enable drag and drop again, but we will NOT be accepting bug reports related to drag and drop editing. Any backtrace or bug regarding drag and drop will be closed and any such bug reports should be directed directly to Qt as it is not something our code controls. If you do not like that, you can of course use Sigil's OpenWith command to edit the xhtml file with whatever html/code editor you prefer. Last edited by KevinH; 08-23-2023 at 11:13 AM. |
Advert | |
|
08-23-2023, 10:40 AM | #6 | |
Sigil Developer
Posts: 7,727
Karma: 5444398
Join Date: Nov 2009
Device: many
|
Quote:
You are of course free to use a different epub editor or to use Sigil's OpenWith to use your own code editor. Last edited by KevinH; 08-23-2023 at 11:08 AM. |
|
08-23-2023, 11:01 AM | #7 |
A Hairy Wizard
Posts: 3,119
Karma: 18727091
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
I added the environmental variable (SIGIL_ALLOW_CODEVIEW_DROP=1) and all seems to work fine. Thank you!
|
08-23-2023, 11:12 AM | #8 |
Sigil Developer
Posts: 7,727
Karma: 5444398
Join Date: Nov 2009
Device: many
|
@Turtle91, @repilo
If it worked well for you in the past and never crashed, that should continue. But the risks are the same as prior versions of Sigil where it worked inadvertently. That said Qt 6.5.2 may be much more stable with drag and drop than earlier versions of Qt. (or much worse! - we just do not know) Last edited by KevinH; 08-23-2023 at 11:25 AM. |
08-23-2023, 02:08 PM | #9 |
Grand Sorcerer
Posts: 27,596
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
|
08-24-2023, 11:33 AM | #10 | |
Enthusiast
Posts: 39
Karma: 10
Join Date: Jul 2023
Device: none
|
Quote:
1. Generally it worked. 2. Sometimes Sigil crashed 3. Somtimes it switched to a tab with my stylesheet and changed it. |
|
08-24-2023, 11:38 AM | #11 |
Sigil Developer
Posts: 7,727
Karma: 5444398
Join Date: Nov 2009
Device: many
|
Which is why we disabled it in the first place as Qt's drag and drop editing has never been very stable, at least in Qt5.
|
08-26-2023, 04:55 PM | #12 |
Junior Member
Posts: 4
Karma: 10
Join Date: Jun 2015
Location: Madrid, Spain
Device: Sony PRST2, Kindle DXG y PW2
|
|
08-26-2023, 05:01 PM | #13 |
Sigil Developer
Posts: 7,727
Karma: 5444398
Join Date: Nov 2009
Device: many
|
What platform? If Windows, just google how to set an environment variable in Windows.
If macOS and Linux you can set them in your login shell profile .bashrc, etc. Last edited by KevinH; 08-26-2023 at 05:03 PM. |
08-26-2023, 05:06 PM | #14 | |
A Hairy Wizard
Posts: 3,119
Karma: 18727091
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Quote:
I use windows and just followed the directions posted here: If you are on a different platform I would just try Mr. Google, or one of his cousins. Cheers! |
|
08-26-2023, 05:07 PM | #15 |
A Hairy Wizard
Posts: 3,119
Karma: 18727091
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
jinx
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
drag and drop problem | 73kmax | Library Management | 6 | 11-08-2021 09:18 PM |
No more Drag and Drop? | hard_boiled | Library Management | 14 | 09-29-2013 07:44 PM |
Drag and drop does not work | fartang | Library Management | 0 | 07-07-2012 09:34 AM |
Drag 'n' Drop | Perkin | Calibre | 17 | 10-06-2010 11:46 AM |
Drag and Drop | jjjconnon | Calibre | 11 | 02-27-2010 11:59 PM |