Skip to content

GUI fixes#1560

Merged
amilcarlucas merged 2 commits into
masterfrom
GUI_fixes
Apr 27, 2026
Merged

GUI fixes#1560
amilcarlucas merged 2 commits into
masterfrom
GUI_fixes

Conversation

@amilcarlucas
Copy link
Copy Markdown
Collaborator

Description

Misc GUI fixes

Checklist

  • Run pre-commit checks locally
  • Verified by a human programmer
  • All commits are signed off (use git commit --signoff)
  • Code follows our coding standards
  • Documentation updated if needed
  • No breaking changes or properly documented

Testing

Describe how you tested these changes:

  • Unit tests pass
  • Integration tests pass
  • Manual testing performed
  • Tested on flight controller hardware

Prevent Tk labelwidget parent mismatches in project
opener/creator windows by creating section labels with
self.main_frame as parent.
Fix Tk image lifecycle issues in the base window to avoid icon/image fallback
and missing-image runtime errors:
- keep a persistent PhotoImage reference for window iconphoto
- bind buffered PhotoImage instances to the target parent widget
Copilot AI review requested due to automatic review settings April 27, 2026 21:26
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR applies small but important Tkinter GUI fixes to ensure widgets/images are correctly parented and to prevent image/icon objects from being garbage-collected.

Changes:

  • Pass explicit masters/parents to ttk.Label and tk.PhotoImage to stabilize widget hierarchy.
  • Preserve the application icon PhotoImage reference to avoid Tkinter icon disappearing.
  • Update a frontend unit test to match the new PhotoImage(master=..., ...) call signature.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
tests/test_frontend_tkinter_base_window.py Updates assertion to match PhotoImage being created with an explicit master.
ardupilot_methodic_configurator/frontend_tkinter_project_opener.py Sets explicit parent for option header labels used for LabelFrame headers.
ardupilot_methodic_configurator/frontend_tkinter_project_creator.py Sets explicit parent for the option header label used for a LabelFrame header.
ardupilot_methodic_configurator/frontend_tkinter_base_window.py Keeps icon PhotoImage alive via an instance attribute and parents PhotoImage instances to the correct widget.

Comment thread ardupilot_methodic_configurator/frontend_tkinter_project_opener.py
Comment thread ardupilot_methodic_configurator/frontend_tkinter_project_creator.py
Comment thread ardupilot_methodic_configurator/frontend_tkinter_base_window.py
@github-actions
Copy link
Copy Markdown
Contributor

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
12585 11859 94% 89% 🟢

New Files

No new covered files...

Modified Files

No covered modified files...

updated for commit: 49dc919 by action🐍

@amilcarlucas amilcarlucas merged commit 215dab1 into master Apr 27, 2026
32 of 34 checks passed
@amilcarlucas amilcarlucas deleted the GUI_fixes branch April 27, 2026 21:53
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.

2 participants