FYI all, I plan to add a public method to GroupItem to support reordering of subgroups. The target use case is for a new custom view for Truchas induction coils; specifically we want to allow dragging and dropping rows in a table that displays time steps vs frequency and electrical current data. The planned signature is
// smtk::attribute::GroupItem:: bool shiftGroup(std::size_t fromIndex, std::size_t toIndex); // fromIndex: position of the selected subgroup to be moved // toIndex: position of the subgroup after the move is complete // return value indicates whether move was completed or not
It is a relatively minor change, but because I don’t touch smtkCore’s guts very often, I thought I should give everyone a chance to comment beforehand.
Related to the same use case, there is also a need to “sort” the table based on the time values. My current thinking is for the custom view code to figure out the sorted order, and call the shiftGroup() method, possibly multiple times, to update the GroupItem.