mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 19:33:47 +00:00
Allow user to change ramming time & volume
This commit is contained in:
@@ -125,7 +125,8 @@ RammingPanel::RammingPanel(wxWindow* parent, const std::string& parameters)
|
|||||||
#endif
|
#endif
|
||||||
sizer_chart->Add(m_chart, 0, wxALL, 5);
|
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_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_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);
|
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);
|
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_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());} );
|
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
|
Refresh(true); // erase background
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user