Skip to content

Fix 3979: Mouse click in Connect Dialog jumps to first page - #3980

Merged
pljones merged 2 commits into
jamulussoftware:mainfrom
pljones:fix3979-mouse-click-jumps-to-first-page
Nov 2, 2026
Merged

pljones merged 2 commits into
jamulussoftware:mainfrom
pljones:fix3979-mouse-click-jumps-to-first-page

Conversation

@pljones

@pljones pljones commented Nov 1, 2026 •

Copy link
Copy Markdown
Collaborator

Short description of changes

Bug fix for #3979

Currently, the first time you open the Connect Dialog box:

  • there's no savedServer, focus is not in lvwServers
  • scroll the list box with the mouse wheel
  • click (still no savedServer, but focus is now in lvwServers):
    • lvwServers->setCurrentItem ( lvwServers->topLevelItem ( 0 ) ); runs and the list box flicks up to display that server
    • your mouse click event is passed through to whatever is now under the pointer

The intent here was to improve keyboard navigation - tabbing into the list view should preserve the last selected server, falling back to the first server if you'd not moved down with the cursor keys (thus having selected other servers).

Unfortunately, the current code doesn't distinguish mouse and keyboard.

The small patch adds a check for mouse events.

CHANGELOG: Handle first mouse click inside Connect Dialog box

Context: Fixes an issue?

Fixes: 3979

Does this change need documentation? What needs to be documented and how?

No.

Status of this Pull Request

Tested locally

What is missing until this pull request can be merged?

Review

Checklist

  • I've verified that this Pull Request follows the general code principles
  • I tested my code and it does what I want
  • My code follows the style guide
  • I waited some time after this Pull Request was opened and all GitHub checks completed without errors.
  • I've filled all the content above

@coderabbitai

coderabbitai Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: QUIET
  • Plan: Advanced
  • Run ID: 75bb707c-4a2b-46b1-89b1-b72b0f5e37b1
Commits

Reviewing files that changed from the base of the PR and between c55e3a0 and 6e3e06d.

Files selected for processing: 1
  • src/connectdlg.cpp

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

Walkthrough

When no server is saved, the Connect Dialog selects the first server on focus only if the list has no current item and focus did not come from a mouse event.

Changes: Connect dialog focus selection

Layer / File(s) Summary
Focus-reason selection
src/connectdlg.cpp
The server list selects the first server only when no server is saved, the list has no current item, and focus did not come from a mouse event.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Possibly related issues

Suggested reviewers: softins

Merge Risk: Minimal · up to 6e3e0

The Connect Dialog focus-selection fix addresses the reported jump without leaving an actionable merge-blocking risk.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly identifies the issue and the primary change: preventing a mouse click in the Connect Dialog from jumping to the first item.
Description check Passed The description follows the required template, explains the issue and fix, identifies issue 3979, states documentation is not needed, records testing status, and completes the checklist.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 1 files.

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches
Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@pljones pljones added bug Something isn't working AI AI generated or potentially AI generated labels Nov 1, 2026
@github-project-automation github-project-automation Bot moved this to Triage in Tracking Nov 1, 2026
@pljones pljones moved this from Triage to Waiting on Team in Tracking Nov 1, 2026
@pljones pljones added this to the Release 4.0.0 milestone Nov 1, 2026
@pljones pljones linked an issue Nov 1, 2026 that may be closed by this pull request
@pljones pljones added the backport_required A change to main that needs fix on an existing release. label Nov 1, 2026
@pljones pljones self-assigned this Nov 1, 2026
Comment thread src/connectdlg.cpp Resolved
@github-project-automation github-project-automation Bot moved this from Waiting on Team to Waiting externally in Tracking Nov 2, 2026

@softins softins left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks and works ok now.

@pljones
pljones merged commit 8ba7afc into jamulussoftware:main Nov 2, 2026
12 checks passed
@github-project-automation github-project-automation Bot moved this from Waiting externally to Done in Tracking Nov 2, 2026
@pljones
pljones deleted the fix3979-mouse-click-jumps-to-first-page branch November 2, 2026 17:58
@ann0see

ann0see commented Nov 2, 2026

Copy link
Copy Markdown
Member

Worth putting a new release out or not?

@pljones

pljones commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator Author

Tracking (view)
I'll get the backport done... but I don't think any of them are serious enough yet.

Though I'm tempted. I can see it would be annoying.

@pljones pljones modified the milestones: Release 4.0.0, Release 3.12.6 Nov 3, 2026
@pljones pljones removed the backport_required A change to main that needs fix on an existing release. label Nov 3, 2026
@pljones pljones removed their assignment Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI AI generated or potentially AI generated bug Something isn't working

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Connect Dialog not selecting correct line. beta3, Win11

3 participants