diff --git a/lib/Slic3r/GUI/Plater/3DPreview.pm b/lib/Slic3r/GUI/Plater/3DPreview.pm index 554b9e35a..d59d9a9ec 100644 --- a/lib/Slic3r/GUI/Plater/3DPreview.pm +++ b/lib/Slic3r/GUI/Plater/3DPreview.pm @@ -74,10 +74,6 @@ sub new { my $combochecklist_features = $self->{combochecklist_features} = Wx::ComboCtrl->new(); $combochecklist_features->Create($self, -1, "Feature types", wxDefaultPosition, [200, -1], wxCB_READONLY); - #FIXME If the following line is removed, the combo box popup list will not react to mouse clicks. - # On the other side, with this line the combo box popup cannot be closed by clicking on the combo button on Windows 10. - $combochecklist_features->UseAltPopupWindow(); - $combochecklist_features->EnablePopupAnimation(0); my $feature_text = "Feature types"; my $feature_items = "Perimeter|External perimeter|Overhang perimeter|Internal infill|Solid infill|Top solid infill|Bridge infill|Gap fill|Skirt|Support material|Support material interface|Wipe tower"; Slic3r::GUI::create_combochecklist($combochecklist_features, $feature_text, $feature_items, 1); diff --git a/xs/src/slic3r/GUI/GUI.cpp b/xs/src/slic3r/GUI/GUI.cpp index 6f121ddb0..0b122453f 100644 --- a/xs/src/slic3r/GUI/GUI.cpp +++ b/xs/src/slic3r/GUI/GUI.cpp @@ -487,6 +487,11 @@ void create_combochecklist(wxComboCtrl* comboCtrl, std::string text, std::string wxCheckListBoxComboPopup* popup = new wxCheckListBoxComboPopup; if (popup != nullptr) { + // FIXME If the following line is removed, the combo box popup list will not react to mouse clicks. + // On the other side, with this line the combo box popup cannot be closed by clicking on the combo button on Windows 10. + comboCtrl->UseAltPopupWindow(); + + comboCtrl->EnablePopupAnimation(false); comboCtrl->SetPopupControl(popup); popup->SetStringValue(text); popup->Bind(wxEVT_CHECKLISTBOX, [popup](wxCommandEvent& evt) { popup->OnCheckListBox(evt); }); diff --git a/xs/src/slic3r/GUI/wxExtensions.cpp b/xs/src/slic3r/GUI/wxExtensions.cpp index f9805cdb1..34a14ee12 100644 --- a/xs/src/slic3r/GUI/wxExtensions.cpp +++ b/xs/src/slic3r/GUI/wxExtensions.cpp @@ -62,6 +62,8 @@ void wxCheckListBoxComboPopup::OnCheckListBox(wxCommandEvent& evt) event.SetEventObject(cmb); cmb->ProcessWindowEvent(event); } + + evt.Skip(); } void wxCheckListBoxComboPopup::OnListBoxSelection(wxCommandEvent& evt)