Skip to content
  • Felix Ernst's avatar
    Fix saving sort role after change from header · 13cf4c09
    Felix Ernst authored and Méven Car's avatar Méven Car committed
    This is a partial revert of
    5186f09c. That commit tried to
    simplify code, however this lead to the saving of view properties
    being skipped, introducing the linked bug.
    
    The issue is that by the time the slotSortRoleChangedFromHeader()
    method is called, the model already changed its sort role.
    Therefore the check if the new role is identical to the old sort
    role fails and no saving would occur.
    
    With this partial revert the header will continue to change the
    sort role itself (which allows a minor optimization of not double
    sorting when also changing the sort order at the same time). The
    method slotSortRoleChangedFromHeader() is then only responsible
    for saving that change in the ViewProperties and telling the
    SortBy menu in the user interface that the sorting has changed.
    
    BUG: 480246
    13cf4c09