Skip to content

Comments

Fix BackstageView popout issues: window closing logic, missing icon, and code cleanup#3671

Open
MostafaElsehy wants to merge 1 commit intoArduPilot:masterfrom
MostafaElsehy:fix-config-popup-issue
Open

Fix BackstageView popout issues: window closing logic, missing icon, and code cleanup#3671
MostafaElsehy wants to merge 1 commit intoArduPilot:masterfrom
MostafaElsehy:fix-config-popup-issue

Conversation

@MostafaElsehy
Copy link

Problem Description

This PR addresses Issue #3633 regarding the "pop-out" functionality in the Configuration/Setup screens (BackstageView).

Issues fixed:

  1. Ghost Window: When double-clicking a menu item to pop it out, navigating away (or clicking the item again) would return the content to the main window but leave the external form open and empty.
  2. Missing Icon: The external pop-out window displayed a generic default Windows icon instead of the Mission Planner application icon.
  3. Code Cleanup: Translated existing code comments to English and added standard documentation for better readability.

Solution

  • Closing Logic: Updated ActivatePage in BackstageView.cs to check if the requested page is currently hosted in an external form. If so, the parent form is closed before re-docking the content.
  • Icon Logic: Updated lnkButton_DoubleClick to assign the application icon to the new form. Included a fallback mechanism using Icon.ExtractAssociatedIcon (wrapped in a preprocessor directive to maintain cross-platform compatibility).

Testing Steps

  1. Go to the CONFIG tab.
  2. Double-click on "Planner" (or any menu item) to pop it out.
  3. Verify the new window has the correct Mission Planner icon.
  4. Click on "Full Parameter List" (or navigate back to "Planner").
  5. Verify that the external window closes automatically and the content returns to the main view properly.

Screenshots

Screenshot

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