One issue that has recently come to light is that when multiple pqSMTKAttributeItemWidgets (subclasses of qtItem) of the same type are instantiated, they all create QShortcut objects with the same key sequence. When that happens, the shortcuts no longer emit an activated() signal; instead they emit ambiguouslyActivated(). The problem is that these events are also emitted for partial key-sequence matches, so it might be that the signal is emitted first when
Ctrl/Cmd is pressed and again when
P is pressed.
The question is how to change the UI so that behavior is maximally useful and minimally astonishing. Things that contribute to maximal usefulness:
- ability to have all (or at least some) widgets simultaneously visible in 3-d views so users can position them relative to each other.
- avoid requiring users to switch between panels where different Qt widgets reside in order to get the 3d widget into an editable/responsive state.
- consistent behavior even when widgets of different types (e.g., point and line widgets) both use the same shortcut for edits.
Some possible avenues to explore:
- explicit indication of focus on Qt widgets, synchronized to the picking behavior. Tab order would need some attention.
- explicit indication of focus on 3D PV widgets
- user-directed choice of focus widget in Qt panels (via ternary button: hide, show, interact)
- find a way to deconflict duplicate shortcuts (either by not adding potential conflicts or by resolving conflicts so that only a single widget is allowed to respond to the shortcut).