Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Automatically select newly added table rows #4216

Merged
merged 3 commits into from
Dec 6, 2022

Conversation

kornes
Copy link
Contributor

@kornes kornes commented Dec 5, 2022

Pull request checklist:

  • CHANGELOG.md was updated, if applicable

Description

Pressing Add button above tables in settings window adds new row at the bottom.
When table has scrollbar, new rows are not visible right away and its not clear if Add button even worked.

changes introduced in PR:

  • new rows are automatically selected (and scrolled to when not visible) in all settings tables
  • removed now redundant selections in Hotkeys (KeyboardSettingsPage)
  • unnecessary EditableModelView::selectRow(int row) is removed and QTableView::selectRow(int row) is used internally instead. Functionality is still exposed via existing public api: EditableModelView::getTableView()->selectRow()

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

src/widgets/helper/EditableModelView.cpp Show resolved Hide resolved
src/widgets/helper/EditableModelView.cpp Show resolved Hide resolved
Copy link
Member

@pajlada pajlada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice clean fix, thank you!

@pajlada pajlada enabled auto-merge (squash) December 6, 2022 22:32
@pajlada pajlada merged commit 36c8fff into Chatterino:master Dec 6, 2022
@kornes kornes deleted the feat_select-new-table-rows branch December 7, 2022 01:24
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.

None yet

2 participants