Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Matena <lukasmatena@seznam.cz>2019-06-19 11:15:01 +0300
committerLukas Matena <lukasmatena@seznam.cz>2019-06-19 12:04:12 +0300
commit5a1e1bc10c887a3408194cd546b2a704b94d08f3 (patch)
tree3b392f9fdd7ef27b4dc1a5e210dc3f5710aa3a75 /src/slic3r/GUI/GUI_ObjectManipulation.cpp
parent967dba2b90726e7daed5dd70b5923a85e9562d49 (diff)
GUI_ObjectManipulation.cpp - Removed implicit capture by value in some of the lambdas
Diffstat (limited to 'src/slic3r/GUI/GUI_ObjectManipulation.cpp')
-rw-r--r--src/slic3r/GUI/GUI_ObjectManipulation.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/slic3r/GUI/GUI_ObjectManipulation.cpp b/src/slic3r/GUI/GUI_ObjectManipulation.cpp
index 310000ecc..4ccaa6847 100644
--- a/src/slic3r/GUI/GUI_ObjectManipulation.cpp
+++ b/src/slic3r/GUI/GUI_ObjectManipulation.cpp
@@ -185,7 +185,7 @@ ObjectManipulation::ObjectManipulation(wxWindow* parent) :
unsigned int axis_idx = (axis[0] - 'x'); // 0, 1 or 2
// We will add a button to toggle mirroring to each axis:
- auto mirror_button = [=](wxWindow* parent) {
+ auto mirror_button = [this, mirror_btn_width, axis_idx, &label](wxWindow* parent) {
wxSize btn_size(em_unit(parent) * mirror_btn_width, em_unit(parent) * mirror_btn_width);
auto btn = new ScalableButton(parent, wxID_ANY, "mirroring_off.png", wxEmptyString, btn_size, wxDefaultPosition, wxBU_EXACTFIT | wxNO_BORDER | wxTRANSPARENT_WINDOW);
btn->SetToolTip(wxString::Format(_(L("Toggle %s axis mirroring")), label));
@@ -195,7 +195,7 @@ ObjectManipulation::ObjectManipulation(wxWindow* parent) :
auto sizer = new wxBoxSizer(wxHORIZONTAL);
sizer->Add(btn);
- btn->Bind(wxEVT_BUTTON, [=](wxCommandEvent &e) {
+ btn->Bind(wxEVT_BUTTON, [this, axis_idx](wxCommandEvent &e) {
Axis axis = (Axis)(axis_idx + X);
if (m_mirror_buttons[axis_idx].second == mbHidden)
return;
@@ -258,13 +258,13 @@ ObjectManipulation::ObjectManipulation(wxWindow* parent) :
return btn;
};
// Add reset scale button
- auto reset_scale_button = [=](wxWindow* parent) {
+ auto reset_scale_button = [this](wxWindow* parent) {
auto btn = new ScalableButton(parent, wxID_ANY, ScalableBitmap(parent, "undo"));
btn->SetToolTip(_(L("Reset scale")));
m_reset_scale_button = btn;
auto sizer = new wxBoxSizer(wxHORIZONTAL);
sizer->Add(btn, wxBU_EXACTFIT);
- btn->Bind(wxEVT_BUTTON, [=](wxCommandEvent &e) {
+ btn->Bind(wxEVT_BUTTON, [this](wxCommandEvent &e) {
change_scale_value(0, 100.);
change_scale_value(1, 100.);
change_scale_value(2, 100.);
@@ -275,13 +275,13 @@ ObjectManipulation::ObjectManipulation(wxWindow* parent) :
}
else if (option_name == "Rotation") {
// Add reset rotation button
- auto reset_rotation_button = [=](wxWindow* parent) {
+ auto reset_rotation_button = [this](wxWindow* parent) {
auto btn = new ScalableButton(parent, wxID_ANY, ScalableBitmap(parent, "undo"));
btn->SetToolTip(_(L("Reset rotation")));
m_reset_rotation_button = btn;
auto sizer = new wxBoxSizer(wxHORIZONTAL);
sizer->Add(btn, wxBU_EXACTFIT);
- btn->Bind(wxEVT_BUTTON, [=](wxCommandEvent &e) {
+ btn->Bind(wxEVT_BUTTON, [this](wxCommandEvent &e) {
GLCanvas3D* canvas = wxGetApp().plater()->canvas3D();
Selection& selection = canvas->get_selection();