Skip to content

Double-click radio entry in SmartLink dialog to connect (#1139)#1153

Merged
ten9876 merged 2 commits into
aethersdr:mainfrom
AetherClaude:aetherclaude/issue-1139
Apr 11, 2026
Merged

Double-click radio entry in SmartLink dialog to connect (#1139)#1153
ten9876 merged 2 commits into
aethersdr:mainfrom
AetherClaude:aetherclaude/issue-1139

Conversation

@aethersdr-agent

Copy link
Copy Markdown
Contributor

Summary

  • Connects QListWidget::itemDoubleClicked to onConnectClicked() in ConnectionPanel so double-clicking a radio entry is equivalent to single-click + Connect button.
  • A !m_connected guard prevents an accidental disconnect when already connected.
  • No header changes, no new slots, no protocol changes — single connect() call added.

Fixes #1139

Test plan

  • Log in via SmartLink; double-click a radio entry — connection initiates immediately.
  • Single-click + Connect button still works as before.
  • Double-click on an empty list does nothing and does not crash.
  • While already connected, double-clicking a list entry does nothing.
  • LAN-discovered and SmartLink (WAN) entries both respond correctly to double-click.

🤖 Generated with Claude Code

Connect QListWidget::itemDoubleClicked to onConnectClicked() so that
double-clicking a radio entry is equivalent to single-click + Connect.
The !m_connected guard prevents accidental disconnect when already connected.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Connect QListWidget::itemDoubleClicked to onConnectClicked() so that
double-clicking a radio entry is equivalent to single-click + Connect.
The !m_connected guard prevents accidental disconnect when already connected.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

@aethersdr-agent aethersdr-agent Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Clean, minimal implementation — looks good.

The single connect() added at line 147 is the right approach: it reuses the existing onConnectClicked() handler rather than duplicating logic, so the two paths (button click and double-click) stay in sync automatically. A few things I checked:

  • !m_connected guard — correct. Prevents a double-click from firing into onConnectClicked while already connected, which could cause unintended re-connection attempts.
  • Empty listitemDoubleClicked doesn't fire when there are no items, so no null dereference is possible; the unused QListWidgetItem* parameter is correctly discarded.
  • Lambda capturethis is safe; both the list widget and ConnectionPanel share the same lifetime, so the connection is torn down with the panel.
  • No header changes — the lambda avoids a new named slot, which keeps the diff minimal. Appropriate for a one-liner behaviour change.
  • Scope — only ConnectionPanel.cpp touched; no drift into unrelated files.

No issues found. Thanks for the contribution — double-clicking to connect is a natural UX expectation for this kind of list dialog.

@ten9876 ten9876 merged commit 4b0ed91 into aethersdr:main Apr 11, 2026
5 checks passed
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.

Double-click SmartLink radio entry to connect

1 participant