Skip to content

fix: timelapse popup flicker, scroll-row overlap, status text clip - #681

Open
SukiSunYuhang wants to merge 1 commit into
Snapmaker:feature_wcp_downloadfilesfrom
SukiSunYuhang:fix-popup-flicker-scroll
Open

fix: timelapse popup flicker, scroll-row overlap, status text clip#681
SukiSunYuhang wants to merge 1 commit into
Snapmaker:feature_wcp_downloadfilesfrom
SukiSunYuhang:fix-popup-flicker-scroll

Conversation

@SukiSunYuhang

Copy link
Copy Markdown

Summary

Fixes three regressions in the timelapse download popup (TimelapseDownloadPopup) that appeared after the earlier anti-flicker work.

1. Rows overlapped when scrolling the list

Suppressing wxEVT_ERASE_BACKGROUND on each row stopped the row from clearing its background, so on scroll old pixels persisted and rows visually stacked. Replaced with SetDoubleBuffered(true) on the dialog, the scrolled task panel, and each row — flicker-free and scroll-correct.

2. Status text was clipped ("Device disconnected.""Device" / blank)

set_status_text (the path used by mark_task_error for failure reasons) only called SetLabel + Refresh(), never Layout(). Label (wxStaticText) updates only its best size on SetLabel; the actual window width is recomputed by the sizer on Layout(). So the label kept its old narrower width and longer text clipped to it — inconsistently per row. Fixed by calling Layout() before Refresh().

3. Flicker on cancel / batch add

  • set_state: full Refresh() instead of Refresh(false).
  • add_tasks: wrapped batch row creation in wxWindowUpdateLocker for 30+ file lists.

- SetDoubleBuffered on dialog/scrolled-panel/rows for flicker-free repaint,
  replacing empty EVT_ERASE_BACKGROUND which left row backgrounds uncleared
  and caused rows to visually overlap when scrolling the list
- set_status_text: Layout() before Refresh() so the label window grows to
  fit longer text; it previously kept the old narrower width and clipped
  (e.g. "Device disconnected." rendered as "Device" or blank)
- set_state: full Refresh() instead of Refresh(false) for a complete repaint
- add_tasks: wrap batch row creation in wxWindowUpdateLocker to avoid
  per-row repaint flicker when adding 30+ files at once
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.

1 participant