Dismiss the Slice-Plate Popup on Every Path Into the Filament Grouping Dialog (#16359)

#16284 closed the Slice-plate hover popup only when the Slice button opened
the filament grouping dialog. The dialog also opens from the plate's filament
grouping icon, the preview legend, slicing notification links and the send
dialog, and a popup still shown on those paths keeps the mouse capture on
macOS and starves the modal dialog of clicks. Dismiss it in
FilamentMapDialog::ShowModal() instead, so every path is covered.

The popup could also stay up on its own on macOS: an enter event stopped its
close timer, and when the timer fired with the cursor inside it returned
without re-arming, so without a later leave event the popup never closed. On
macOS the timer now keeps running while the popup is shown and closes it once
the cursor is outside. The popup also stops and frees its timer when destroyed.
This commit is contained in:
HanifKoh
2026-10-11 15:48:49 +08:00
committed by GitHub
parent bae8f64b8b
commit a671bf605d
4 changed files with 25 additions and 8 deletions
+9
View File
@@ -20,6 +20,8 @@
#include <wx/gdicmn.h>
#include <wx/dialog.h>
#include "slic3r/GUI/FilamentMapPanel.hpp"
#include "slic3r/GUI/FilamentGroupPopup.hpp"
#include "slic3r/GUI/MainFrame.hpp"
namespace Slic3r { namespace GUI {
@@ -377,6 +379,13 @@ FilamentMapMode FilamentMapDialog::get_mode()
int FilamentMapDialog::ShowModal()
{
// The Slice-plate hover popup is a transient popup that keeps grabbing the mouse
// capture while shown. Left behind this modal dialog it would starve the dialog of
// mouse events, so close it synchronously first, whichever path opened the dialog.
if (MainFrame* frame = wxGetApp().mainframe;
frame && frame->m_filament_group_popup && frame->m_filament_group_popup->IsShown())
frame->m_filament_group_popup->Dismiss();
update_panel_status(m_page_type);
return wxDialog::ShowModal();
}