View Single Post
Old 07-31-2018, 11:12 AM   #22
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: 28,661
Karma: 205039118
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
This boils down to the "activated" signal of QTreeView (inherited from QAbstractItemView). "activated" can mean many things depending on the Platform -- single-click, double-click, hitting the enter key on a highlighted item, etc.

So clearly, KDE's "single-click to open files" setting alters the activated signal of QAbstractItemView in its system Qt5.

We could change to using the "doubleClick" signal of QAbstractItemView rather than "activated" (since I don't know of any special double-click functionality that Sigil reserves in Book View). That would likely fix most--if not all--of the issues with KDE (multi-selection and reordering crashes), but I'm loathe to use that solution. Mainly because it wouldn't take into account hitting the Enter/Return key when an item in Book View was highlighted (which works on at least two of the platforms Sigil supports). And doing so would affect those who favor keyboard input over mouse.

The only other solution might be to subclass QAbstractItemView to create new signals/slots that would behave consistently across all platforms (double-click and enter/return). But that could get complicated.

Will have to think more on it.

@KevinH: Are editor tabs opened/focused with single-clicks on Book View items with OS X or double-clicks? What about hitting the enter/return key when a Book View item is highlighted?

Last edited by DiapDealer; 07-31-2018 at 01:04 PM.
DiapDealer is online now   Reply With Quote