ebook editor / Files Browser loses focus after operation

Bug #1653311 reported by m4mmon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Fix Released
Undecided
Unassigned

Bug Description

calibre 64-bit 2.76.0 on Windows operating system

After performing an operation in "Files Browser" section of the ebook editor, focus on the section is lost.

When you click somewhere inside the Files Browser, you can navigate, select/unselect/rename elements thanks to the classic keyboard controls, arrows/ctrl/shift/space/F2.
For example, select an element, F2 to rename it, change the name, and validate the operation with the enter key using keyboard is not immediately possible anymore.
It seems that no other element has focus, since ebook editor does not react to keyboard inputs.

A mouse click is needed to gain focus again, and it is a bit annoying.

Revision history for this message
Kovid Goyal (kovid) wrote : Re: calibre bug 1653311

This is not worth the effort for me personally. If some one else wants to implement it, I will be happy to supply any needed guidance. If so, re-open the ticket and we can discuss it.

 status wontfix

Changed in calibre:
status: New → Won't Fix
Revision history for this message
m4mmon (m4mmon) wrote :

Here is a patch that seems to work. In boss.py, the selection is performed in a second loop, because the benefit of the setCurrentIndex() on items is lost after the call to apply_container_update_to_gui(). Performing the selection in the first loop and calling setFocus after does not give the appropriate result. May be it would be more efficient to simply call select_by_name at then end with the latest element of the name_map?
I hope you can make remarks about it, or suggest a better solution.

Revision history for this message
Kovid Goyal (kovid) wrote : Fixed in master

Fixed in branch master. The fix will be in the next release. calibre is usually released every Friday.

 status fixreleased

Changed in calibre:
status: Won't Fix → Fix Released
Revision history for this message
m4mmon (m4mmon) wrote :

thank you Kovid :)
great fix, hope I did not make you lose too much time.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.