4th attempt to fix JIRA SPE-26 (Feature types on MAC)
This commit is contained in:
parent
23b1c8f1d2
commit
36601723a2
@ -74,10 +74,6 @@ sub new {
|
|||||||
|
|
||||||
my $combochecklist_features = $self->{combochecklist_features} = Wx::ComboCtrl->new();
|
my $combochecklist_features = $self->{combochecklist_features} = Wx::ComboCtrl->new();
|
||||||
$combochecklist_features->Create($self, -1, "Feature types", wxDefaultPosition, [200, -1], wxCB_READONLY);
|
$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_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";
|
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);
|
Slic3r::GUI::create_combochecklist($combochecklist_features, $feature_text, $feature_items, 1);
|
||||||
|
@ -487,6 +487,11 @@ void create_combochecklist(wxComboCtrl* comboCtrl, std::string text, std::string
|
|||||||
wxCheckListBoxComboPopup* popup = new wxCheckListBoxComboPopup;
|
wxCheckListBoxComboPopup* popup = new wxCheckListBoxComboPopup;
|
||||||
if (popup != nullptr)
|
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);
|
comboCtrl->SetPopupControl(popup);
|
||||||
popup->SetStringValue(text);
|
popup->SetStringValue(text);
|
||||||
popup->Bind(wxEVT_CHECKLISTBOX, [popup](wxCommandEvent& evt) { popup->OnCheckListBox(evt); });
|
popup->Bind(wxEVT_CHECKLISTBOX, [popup](wxCommandEvent& evt) { popup->OnCheckListBox(evt); });
|
||||||
|
@ -62,6 +62,8 @@ void wxCheckListBoxComboPopup::OnCheckListBox(wxCommandEvent& evt)
|
|||||||
event.SetEventObject(cmb);
|
event.SetEventObject(cmb);
|
||||||
cmb->ProcessWindowEvent(event);
|
cmb->ProcessWindowEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
evt.Skip();
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxCheckListBoxComboPopup::OnListBoxSelection(wxCommandEvent& evt)
|
void wxCheckListBoxComboPopup::OnListBoxSelection(wxCommandEvent& evt)
|
||||||
|
Loading…
Reference in New Issue
Block a user