Skip to content

Feature/sort cycle - #4239

Open
deepsidhu1313 wants to merge 2 commits into
sqlitebrowser:masterfrom
deepsidhu1313:feature/sort-cycle
Open

deepsidhu1313 wants to merge 2 commits into
sqlitebrowser:masterfrom
deepsidhu1313:feature/sort-cycle

Conversation

@deepsidhu1313

Copy link
Copy Markdown
Contributor
  • Add option to cycle column header sorting through ascending, descending and none

  • Clicking the header of a sorted column only toggled between ascending and descending order, so removing the sorting required the separate 'Clear sorting' action. A new setting in the Data Browser preferences makes a click on a descending column remove the sorting instead, so repeated clicks cycle through ascending, descending and no sorting. This also works for Ctrl+click, where only the clicked column is removed from the sort columns.

The default behaviour is unchanged.
The decision how a click changes the sort columns moves from TableBrowser::headerClicked into sqlb::updateSortColumns so that it can be covered by a unit test.

  • New Record (Ctrl+Shift+N), Delete Record (Ctrl+Shift+D) and Revert Changes (Ctrl+Shift+R) had no keyboard shortcut. The two record actions are limited to the table browser which has the focus, so they do not clash when there are multiple browsers. The shortcuts are also added to the tool tips.
    A test checks that the actions have shortcuts which are unique among the actions and do not shadow standard keys.

…ng and none

Clicking the header of a sorted column only toggled between ascending and
descending order, so removing the sorting required the separate 'Clear
sorting' action. A new setting in the Data Browser preferences makes a
click on a descending column remove the sorting instead, so repeated clicks
cycle through ascending, descending and no sorting. This also works for
Ctrl+click, where only the clicked column is removed from the sort columns.
The default behaviour is unchanged.

The decision how a click changes the sort columns moves from
TableBrowser::headerClicked into sqlb::updateSortColumns so that it can be
covered by a unit test.
New Record (Ctrl+Shift+N), Delete Record (Ctrl+Shift+D) and Revert Changes
(Ctrl+Shift+R) had no keyboard shortcut. The two record actions are limited
to the table browser which has the focus, so they do not clash when there are
multiple browsers. The shortcuts are also added to the tool tips.

A test checks that the actions have shortcuts which are unique among the
actions and do not shadow standard keys.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants