mirror of
https://git.mirrors.martin98.com/https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-03 14:55:12 +08:00
Set MAX_FLUSH_VALUE to maximum possible value
"Insanely high value that still plays nicely when converting between int and float (because it's internally stored in m_matrix as floats). 2147483520 (which is ~2 cubic meters) is the max value that can be saved properly in this case."
This commit is contained in:
parent
e97d9f5f17
commit
267d81e9cc
@ -498,11 +498,11 @@ WipingPanel::WipingPanel(wxWindow* parent, const std::vector<float>& matrix, con
|
|||||||
edit_boxes[i][j]->Bind(wxEVT_TEXT, [this, i, j](wxCommandEvent& e) {
|
edit_boxes[i][j]->Bind(wxEVT_TEXT, [this, i, j](wxCommandEvent& e) {
|
||||||
wxString str = edit_boxes[i][j]->GetValue();
|
wxString str = edit_boxes[i][j]->GetValue();
|
||||||
int value = wxAtoi(str);
|
int value = wxAtoi(str);
|
||||||
if (value > MAX_FLUSH_VALUE) {
|
if (value > MAX_FLUSH_VALUE) {
|
||||||
str = wxString::Format(("%d"), MAX_FLUSH_VALUE);
|
str = wxString::Format(("%d"), MAX_FLUSH_VALUE);
|
||||||
edit_boxes[i][j]->SetValue(str);
|
edit_boxes[i][j]->SetValue(str);
|
||||||
}
|
}
|
||||||
else if (value < 0) {
|
else if (value < 0) {
|
||||||
edit_boxes[i][j]->SetValue(wxString("0"));
|
edit_boxes[i][j]->SetValue(wxString("0"));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user