Slot Viewer Dev: Close Slot Column Red-X Buttons, maintenance and operation Bug Number: n/a Release notes (y/n): no For Release Nums: 7.2 See screenshots: http://cadswes2.colorado.edu/~philw/2017/SlotViewer/2017-07-20/dlg1.png http://cadswes2.colorado.edu/~philw/2017/SlotViewer/2017-07-20/dlg2.png (this second screenshot shows the work of the prior commit). This commit completes the maintenance (life-cycle) and maintenance of the Red-X ("Remove Slot") buttons in the Slot Viewer's column headers. When a slot is deleted, the series data display table is rebuilt. Without special coding, the table was being built with the original slot order (before they had been repositioned by dragging). This is because the column reordering is done auto-magically by the QHeaderView, applying its own item order mapping. SO, when we want the array of Slots (SlotColRefs) in the order that the user is seeing them, we need to apply this new utility method (new in this commit): void SlotDataTableView::sortSlotListByVisualIndex (QList& slotList) const; Other addressed issues: (1) Prevent creation of close buttons for non-slot columns (e.g. the generally hidden series display compression column). (2) Update positions of close buttons when scrolling horizontally (when the dialog isn't as wide as the table content). Other New SlotDataTableView methods (for close-button maintenance): bool closeButtonsSupported() const; void recreateCloseButtons(); // notifications om HeaderView* _horzHeaderView void slotColCloseButtonClicked (int col); New SlotDataTableView::HeaderView methods (for close-button maintenance): bool closeButtonsSupported() const; void recreateCloseButtons(); void updateCloseButtonPositions(); New SlotQtDlg method (for close-button implementation): void slotViewer_slotColCloseClicked (int col); ---