From 6cf82643626c1d8196694cf1cf7f0657fc2134bb Mon Sep 17 00:00:00 2001 From: bubnikv Date: Tue, 13 Feb 2018 17:46:23 +0100 Subject: [PATCH] Re-enabled $combochecklist_features->UseAltPopupWindow(), without this line the combo box popup was not reacting to mouse events on Windows 10. --- lib/Slic3r/GUI/Plater/3DPreview.pm | 3 +++ xs/src/slic3r/GUI/GUI.cpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/Slic3r/GUI/Plater/3DPreview.pm b/lib/Slic3r/GUI/Plater/3DPreview.pm index f0175f5a4e..6f96b8a96c 100644 --- a/lib/Slic3r/GUI/Plater/3DPreview.pm +++ b/lib/Slic3r/GUI/Plater/3DPreview.pm @@ -72,6 +72,9 @@ sub new { my $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"; diff --git a/xs/src/slic3r/GUI/GUI.cpp b/xs/src/slic3r/GUI/GUI.cpp index 775cfdcf62..809ee8508c 100644 --- a/xs/src/slic3r/GUI/GUI.cpp +++ b/xs/src/slic3r/GUI/GUI.cpp @@ -227,7 +227,7 @@ int combochecklist_get_flags(wxComboCtrl* comboCtrl) for (unsigned int i = 0; i < popup->GetCount(); ++i) { if (popup->IsChecked(i)) - flags += (int)std::pow(2.0f, (float)i); + flags |= 1 << i; } }