src/project/WorkingSetSort.js
function _setCurrentSort(newSort) {
        if (_currentSort !== newSort) {
            if (_currentSort !== null) {
                _currentSort.setChecked(false);
            }
            if (_automaticSort) {
                newSort.setChecked(true);
            }

            CommandManager.get(Commands.CMD_WORKING_SORT_TOGGLE_AUTO).setEnabled(!!newSort.getEvents());
            PreferencesManager.setViewState(_WORKING_SET_SORT_PREF, newSort.getCommandID());
            _currentSort = newSort;
        }
    }
function _setCurrentSort(newSort) {
        if (_currentSort !== newSort) {
            if (_currentSort !== null) {
                _currentSort.setChecked(false);
            }
            if (_automaticSort) {
                newSort.setChecked(true);
            }

            CommandManager.get(Commands.CMD_WORKING_SORT_TOGGLE_AUTO).setEnabled(!!newSort.getEvents());
            PreferencesManager.setViewState(_WORKING_SET_SORT_PREF, newSort.getCommandID());
            _currentSort = newSort;
        }
    }
function _setCurrentSort ( newSort ) { if ( _currentSort !== newSort ) { if ( _currentSort !== null ) { _currentSort . setChecked ( false ) ; } if ( _automaticSort ) { newSort . setChecked ( true ) ; } CommandManager . get ( Commands . CMD_WORKING_SORT_TOGGLE_AUTO ) . setEnabled ( ! ! newSort . getEvents ( ) ) ; PreferencesManager . setViewState ( _WORKING_SET_SORT_PREF , newSort . getCommandID ( ) ) ; _currentSort = newSort ; } }
Sets the current sort method and checks it on the context menu.
@private
@param {Sort} newSort
Sets the current sort method and checks it on the context menu .