Skip to content

Yet another macOS save button fix with dialog popup#1332

Merged
amilcarlucas merged 1 commit intomasterfrom
macOS-save-popup-fix-simplified
Feb 27, 2026
Merged

Yet another macOS save button fix with dialog popup#1332
amilcarlucas merged 1 commit intomasterfrom
macOS-save-popup-fix-simplified

Conversation

@amilcarlucas
Copy link
Collaborator

@amilcarlucas amilcarlucas commented Feb 27, 2026

Much simpler than #1304

Closes #1264

@OmkarSarkar204 can you please test this one?

Signed-off-by: Omkar Sarkar <omkarsarkar24@gmail.com>
Copilot AI review requested due to automatic review settings February 27, 2026 12:26
Copy link
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

Updates Tkinter window centering behavior to avoid macOS-specific UI issues when forcing a window refresh.

Changes:

  • Add OS detection via platform.system().
  • Use update_idletasks() on macOS (Darwin) instead of update() after setting geometry.

Comment on lines +305 to +308
if platform_system() == "Darwin":
window.update_idletasks()
else:
window.update()
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

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

This introduces platform-specific behavior without documenting why macOS needs update_idletasks() while other platforms use update(). Please add a short inline comment explaining the underlying issue/bug being worked around (e.g., what update() triggers on macOS) so future changes don’t accidentally regress it.

Copilot uses AI. Check for mistakes.
@github-actions
Copy link
Contributor

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
11504 10474 91% 89% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
ardupilot_methodic_configurator/frontend_tkinter_base_window.py 95% 🟢
TOTAL 95% 🟢

updated for commit: 5071f6c by action🐍

@github-actions
Copy link
Contributor

Test Results

    2 files  ±0      2 suites  ±0   28m 47s ⏱️ -33s
3 014 tests ±0  3 009 ✅ +2   5 💤 ±0  0 ❌  - 2 
6 028 runs  ±0  6 018 ✅ +2  10 💤 ±0  0 ❌  - 2 

Results for commit 5071f6c. ± Comparison against base commit a686455.

@OmkarSarkar204
Copy link
Contributor

Yes, I tested it and it worked perfectly this time! The popups show up right along with the button without any freezing.

It's amazing how hard I was trying to fix it and how simple your solution was. Thank you for stepping in and doing this. I'm going to review your changes to see where I went wrong.

@amilcarlucas amilcarlucas merged commit f24c235 into master Feb 27, 2026
36 checks passed
@amilcarlucas amilcarlucas deleted the macOS-save-popup-fix-simplified branch February 27, 2026 14:37
@amilcarlucas
Copy link
Collaborator Author

Thanks for testing! I merged it to master and will close the other PR

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.

"Save data and start configuration" button unresponsive on macOS

3 participants