From b86f9a88b15618a7c033d761f6aaea0fa155d89d Mon Sep 17 00:00:00 2001 From: cochcoder <103969142+cochcoder@users.noreply.github.com> Date: Sat, 1 Jun 2024 19:10:43 -0400 Subject: [PATCH] Allow user to change ramming time & volume --- src/slic3r/GUI/WipeTowerDialog.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/slic3r/GUI/WipeTowerDialog.cpp b/src/slic3r/GUI/WipeTowerDialog.cpp index c8b973b509..42d5a7539e 100644 --- a/src/slic3r/GUI/WipeTowerDialog.cpp +++ b/src/slic3r/GUI/WipeTowerDialog.cpp @@ -125,7 +125,8 @@ RammingPanel::RammingPanel(wxWindow* parent, const std::string& parameters) #endif sizer_chart->Add(m_chart, 0, wxALL, 5); - m_widget_time = new ::SpinInputDouble(this,wxID_ANY,wxEmptyString,wxDefaultPosition,wxSize(ITEM_WIDTH()*2.5, -1),style,0.,5.0,3.,0.5); + m_widget_time = new ::SpinInputDouble(this,wxID_ANY,wxEmptyString,wxDefaultPosition,wxSize(ITEM_WIDTH()*2.5, -1),style,0.,5.0,3.,0.5); + m_widget_time->SetDigits(2); m_widget_volume = new ::SpinInput(this,wxID_ANY,wxEmptyString,wxDefaultPosition,wxSize(ITEM_WIDTH()*2.5, -1),style,0,10000,0); m_widget_ramming_line_width_multiplicator = new ::SpinInput(this,wxID_ANY,wxEmptyString,wxDefaultPosition,wxSize(ITEM_WIDTH()*2.5, -1),style,10,200,100); m_widget_ramming_step_multiplicator = new ::SpinInput(this,wxID_ANY,wxEmptyString,wxDefaultPosition,wxSize(ITEM_WIDTH()*2.5, -1),style,10,200,100); @@ -169,8 +170,6 @@ RammingPanel::RammingPanel(wxWindow* parent, const std::string& parameters) SetSizer(sizer); m_widget_time->Bind(wxEVT_TEXT,[this](wxCommandEvent&) {m_chart->set_xy_range(m_widget_time->GetValue(),-1);}); - m_widget_time->Bind(wxEVT_CHAR,[](wxKeyEvent&){}); // do nothing - prevents the user to change the value - m_widget_volume->Bind(wxEVT_CHAR,[](wxKeyEvent&){}); // do nothing - prevents the user to change the value Bind(EVT_WIPE_TOWER_CHART_CHANGED,[this](wxCommandEvent&) {m_widget_volume->SetValue(m_chart->get_volume()); m_widget_time->SetValue(m_chart->get_time());} ); Refresh(true); // erase background }