mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 08:47:52 -06:00
GUI_ObjectManipulation.cpp - Removed implicit capture by value in some of the lambdas
This commit is contained in:
parent
967dba2b90
commit
5a1e1bc10c
1 changed files with 6 additions and 6 deletions
|
@ -185,7 +185,7 @@ ObjectManipulation::ObjectManipulation(wxWindow* parent) :
|
||||||
unsigned int axis_idx = (axis[0] - 'x'); // 0, 1 or 2
|
unsigned int axis_idx = (axis[0] - 'x'); // 0, 1 or 2
|
||||||
|
|
||||||
// We will add a button to toggle mirroring to each axis:
|
// 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);
|
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);
|
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));
|
btn->SetToolTip(wxString::Format(_(L("Toggle %s axis mirroring")), label));
|
||||||
|
@ -195,7 +195,7 @@ ObjectManipulation::ObjectManipulation(wxWindow* parent) :
|
||||||
auto sizer = new wxBoxSizer(wxHORIZONTAL);
|
auto sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||||
sizer->Add(btn);
|
sizer->Add(btn);
|
||||||
|
|
||||||
btn->Bind(wxEVT_BUTTON, [=](wxCommandEvent &e) {
|
btn->Bind(wxEVT_BUTTON, [this, axis_idx](wxCommandEvent &e) {
|
||||||
Axis axis = (Axis)(axis_idx + X);
|
Axis axis = (Axis)(axis_idx + X);
|
||||||
if (m_mirror_buttons[axis_idx].second == mbHidden)
|
if (m_mirror_buttons[axis_idx].second == mbHidden)
|
||||||
return;
|
return;
|
||||||
|
@ -258,13 +258,13 @@ ObjectManipulation::ObjectManipulation(wxWindow* parent) :
|
||||||
return btn;
|
return btn;
|
||||||
};
|
};
|
||||||
// Add reset scale button
|
// 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"));
|
auto btn = new ScalableButton(parent, wxID_ANY, ScalableBitmap(parent, "undo"));
|
||||||
btn->SetToolTip(_(L("Reset scale")));
|
btn->SetToolTip(_(L("Reset scale")));
|
||||||
m_reset_scale_button = btn;
|
m_reset_scale_button = btn;
|
||||||
auto sizer = new wxBoxSizer(wxHORIZONTAL);
|
auto sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||||
sizer->Add(btn, wxBU_EXACTFIT);
|
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(0, 100.);
|
||||||
change_scale_value(1, 100.);
|
change_scale_value(1, 100.);
|
||||||
change_scale_value(2, 100.);
|
change_scale_value(2, 100.);
|
||||||
|
@ -275,13 +275,13 @@ ObjectManipulation::ObjectManipulation(wxWindow* parent) :
|
||||||
}
|
}
|
||||||
else if (option_name == "Rotation") {
|
else if (option_name == "Rotation") {
|
||||||
// Add reset rotation button
|
// 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"));
|
auto btn = new ScalableButton(parent, wxID_ANY, ScalableBitmap(parent, "undo"));
|
||||||
btn->SetToolTip(_(L("Reset rotation")));
|
btn->SetToolTip(_(L("Reset rotation")));
|
||||||
m_reset_rotation_button = btn;
|
m_reset_rotation_button = btn;
|
||||||
auto sizer = new wxBoxSizer(wxHORIZONTAL);
|
auto sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||||
sizer->Add(btn, wxBU_EXACTFIT);
|
sizer->Add(btn, wxBU_EXACTFIT);
|
||||||
btn->Bind(wxEVT_BUTTON, [=](wxCommandEvent &e) {
|
btn->Bind(wxEVT_BUTTON, [this](wxCommandEvent &e) {
|
||||||
GLCanvas3D* canvas = wxGetApp().plater()->canvas3D();
|
GLCanvas3D* canvas = wxGetApp().plater()->canvas3D();
|
||||||
Selection& selection = canvas->get_selection();
|
Selection& selection = canvas->get_selection();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue