Skip to content

Fix: send input cleared after successful send, breaking auto-send - #2

Merged
no010 merged 2 commits into
masterfrom
copilot/review-issue-1
Aug 21, 2026
Merged

Fix: send input cleared after successful send, breaking auto-send#2
no010 merged 2 commits into
masterfrom
copilot/review-issue-1

Conversation

Copilot AI commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

After every successful send, send_data() called self.send_input.clear(), wiping the input box. This broke auto-send (the timer's second tick would find an empty input and silently do nothing) and forced users to retype on every manual send.

Changes

  • src/ui/main_window.py — remove self.send_input.clear() from send_data() so the input content persists after sending
# Before
if self.serial_manager.send_text(text, fmt):
    self.sent_bytes += len(text.encode('utf-8'))
    self.send_input.clear()   # ← cleared content, breaking auto-send

# After
if self.serial_manager.send_text(text, fmt):
    self.sent_bytes += len(text.encode('utf-8'))
    # input content preserved

Copilot AI linked an issue Aug 21, 2026 that may be closed by this pull request
Co-authored-by: no010 <189323449+no010@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix cleared input field after sending data Fix: send input cleared after successful send, breaking auto-send Aug 21, 2026
Copilot AI requested a review from no010 August 21, 2026 10:02
@no010
no010 marked this pull request as ready for review August 21, 2026 10:05
Copilot AI lite review requested due to automatic review settings August 21, 2026 10:05
@no010
no010 merged commit daf36db into master Aug 21, 2026
2 of 3 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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.

发送数据后发送框内容会被清空

3 participants