08-26-2023, 10:13 AM | #1 |
A Hairy Wizard
Posts: 3,094
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Clips paste in replace field
I don't know if anyone else is having this issue??
I've upgraded to 2.0.1 and now - occasionally - I will highlight a word(s) then click on a clip from the clips toolbar (different clips have the same issue) and the clip will paste into the replace field of the find/replace window. Once it gets in this mode I close and re-open Sigil and it works fine. I haven't figured out exact replaceable steps What I have been doing is a lot of find/replace before this happens. I have no idea if that is a factor. |
08-26-2023, 11:05 AM | #2 |
A Hairy Wizard
Posts: 3,094
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
OK - I think I found some duplicatable steps.
1) enter something in the find field - doesn't matter what mode the Find/Replace window is using 2) place cursor in the replace field 3) open the Insert Special Characters window 4) hold the ctrl key and click on any symbol (the window should auto-close) 5) click on the "Replace All" button in the Find/Replace window 6) now click somewhere in the CV window or highlight a word 7) click on a clips button.... the clip should insert into the Replace field rather than the CV Holding the Ctrl key while selecting the symbol seems to be the trigger. Last edited by Turtle91; 08-26-2023 at 11:08 AM. |
Advert | |
|
08-26-2023, 06:06 PM | #3 |
Sigil Developer
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
|
Clips you select from a ClipsWindow will indeed go to where the previous windows focus point as the place for the clip to be applied. It has to do that because clicking in the ClipEindow steals focus away from where ever it was.
Clicking in the CV window but not actually editing anything takes focus but for some reason the Find/Replace window was the last focus point recorded before clicking in the ClipWindow. If you use a clip menu, or a clip toolbar button (instead of the ClipWindow), the current (not previous) focus point is used. The problem is when you click in CV the focus is being grabbed by Find and Replace for some reason. The insertspecial character tool has to use the same approach as clicking in that Window steals focus as well. I will look into it. Last edited by KevinH; 08-26-2023 at 06:09 PM. |
08-26-2023, 06:31 PM | #4 |
Grand Sorcerer
Posts: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Just curious, but what is gained by holding Ctrl while selecting something from the special character dialog?
|
08-26-2023, 06:44 PM | #5 |
A Hairy Wizard
Posts: 3,094
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
|
Advert | |
|
08-26-2023, 06:46 PM | #6 | |
A Hairy Wizard
Posts: 3,094
Karma: 18727053
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:
Just to clarify, I was clicking and/or highlighting in the CV window before selecting a clip toolbar button. Once the glitch was triggered it didn't matter how much I highlighted or moved around in the CV window, it would still paste to the replace field. Let me know if you'd like me to try the clip window or clip menu. |
|
08-26-2023, 07:28 PM | #7 |
Sigil Developer
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
|
Could you try just closing the Find Replace window and see if that fixes things?
|
08-26-2023, 07:38 PM | #8 |
A Hairy Wizard
Posts: 3,094
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
OK
Closing the Find/Replace window didn't do anything. When I opened the F/R window again the clips that I had tried while it was closed still showed up in the replace field. The error also occurred when I used the Insert/Clips menu, but it did NOT occur when I used the Clips Window. Also, if I used the Clips window OR opened the Insert Special Character dialog again (and closed it using the 'x') then the glitch went away...it was back to normal. |
08-26-2023, 07:54 PM | #9 |
Sigil Developer
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
|
Okay, that is the reverse of what I thought was happening. So somehow focus changed but for some reason the focus change was not recorded by Sigil's MainWindow
I just need to figure out why it is not being recorded properly. I will look into fixing this for the next release. |
08-26-2023, 10:23 PM | #10 |
A Hairy Wizard
Posts: 3,094
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Coolio - thanks!
|
08-27-2023, 04:12 PM | #11 |
Sigil Developer
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
|
I spoke too soon.
I used exactly the sequence of steps you prescribed 3 times and in each time the p clip was pasted properly in CodeView. And the debug output showed it is working as designed. But this is with macOS. This may be a Window's only issue. Perhaps Doitsu, or BeckyEbook or DiapDealer or someone with Windows can try following these steps to see if they can recreate what you are seeing. If so we can add some debug output to the Application Focus event handler to see where the problem is coming from. |
08-27-2023, 04:30 PM | #12 |
A Hairy Wizard
Posts: 3,094
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
OK. Would it help if I added debug output?
|
08-27-2023, 04:30 PM | #13 |
Sigil Developer
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
|
I booted up my Manjaro Linux VM and built the latest Sigil with Qt 6.5.2 and ran your test.
The clip was always properly pasted in the CV window. So this must either be something specific to Windows or something specific to your set up as I can not recreate the issue with your sequence of steps on macOS or on Linux. |
08-27-2023, 04:32 PM | #14 |
Sigil Developer
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
|
Do you build your own Sigil? If so I would be happy to send a patch that adds the debug output.
If not, I can push the additional debug information to master and create a CI build for you to test with. Just let me know which you prefer. Kevin |
08-27-2023, 04:36 PM | #15 |
Sigil Developer
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
|
I have pushed the extra debug output to master and have asked it to build a Windows test build of Sigil. That is just faster and simpler.
Once it is complete. I will post it and send you a link. Last edited by KevinH; 08-27-2023 at 05:06 PM. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Shortcuts for search & replace clips | celiapgt | Sigil | 2 | 12-11-2016 11:45 PM |
Regular expressions in the replace field | markallanson | Editor | 5 | 09-06-2014 12:44 PM |
Search and Replace: want to remove value that matches another field | einniv | Library Management | 0 | 07-25-2013 08:18 PM |
Search/Replace from Title Field to Pubdate | TMSxMR | Library Management | 5 | 08-06-2012 03:40 AM |
Replace field with match or empty string? | charlweed | Library Management | 2 | 03-29-2012 12:44 AM |