Resolve "Block selection in Exodus reader and multiblock inspector broken"
This commit has several improvements to the UX when it comes to tree views shown in properties panel and similar.
Added support to pqHeaderView
to add custom indicator icons to the
header. These can be used to add custom actions to the header.
pqTreeViewSelectionHelper
adds custom actions to the newly improved
pqHeaderView
to show the context menu (which was not easily
discoverable before). The context menu has been extended to not only
cleanly support sorting and checking/unchecking but also filter the
view.
Closes #18150 (closed)
Additional details
-
Various widgets for variable selection, or block selection now have a special icon in the header.
-
Clicking this button, pops up the same menu as the right-clicking in the widget would. This makes the context menu discoverable.
-
One can type text in the Filter items input box to filter the widget. The widget will immediately update to show only the filtered items. At the same time a "x" button will show up in the header. (note: this icon will be changed soon to be a "clear filtering" icon, the 'x' is only a place holder).
-
To clear filtering, click the cross icon or clear the text in the menu itself.
-
The menu also offers ability to sort/unsort. When sorting, the header now correctly reflects the sort state (unlike before). Also added support to sort in both directions (not just ascending as was the case earlier).
There's a outstanding issue when it comes to toggling checkstate using the header when filtering. It's been reported here: #18399. That may be deferred for later.