From 5e42120df508cab376f1c7bfd4b5918f7286fad3 Mon Sep 17 00:00:00 2001 From: mitt3n <102060045+mitt3n@users.noreply.github.com> Date: Tue, 8 Apr 2025 12:03:37 -0500 Subject: [PATCH 1/5] Increase MAX_FLUSH_VALUE from 999 to 9999 --- src/slic3r/GUI/WipeTowerDialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/slic3r/GUI/WipeTowerDialog.cpp b/src/slic3r/GUI/WipeTowerDialog.cpp index 04c067f7d7..23f054a44c 100644 --- a/src/slic3r/GUI/WipeTowerDialog.cpp +++ b/src/slic3r/GUI/WipeTowerDialog.cpp @@ -34,7 +34,7 @@ static const wxColour g_text_color = wxColour(107, 107, 107, 255); #define BTN_SIZE wxSize(FromDIP(58), FromDIP(24)) #define BTN_GAP FromDIP(20) #define TEXT_BEG_PADDING FromDIP(30) -#define MAX_FLUSH_VALUE 999 +#define MAX_FLUSH_VALUE 9999 #define MIN_WIPING_DIALOG_WIDTH FromDIP(300) #define TIP_MESSAGES_PADDING FromDIP(8) From dd4a3ec0423d98defbcc16df1d5d7b2ac62d06a6 Mon Sep 17 00:00:00 2001 From: mitt3n <102060045+mitt3n@users.noreply.github.com> Date: Tue, 8 Apr 2025 23:03:50 -0500 Subject: [PATCH 2/5] Removing MAX_FLUSH_VALUE Purge all the filament! --- src/slic3r/GUI/WipeTowerDialog.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/slic3r/GUI/WipeTowerDialog.cpp b/src/slic3r/GUI/WipeTowerDialog.cpp index 23f054a44c..a164b4ab0a 100644 --- a/src/slic3r/GUI/WipeTowerDialog.cpp +++ b/src/slic3r/GUI/WipeTowerDialog.cpp @@ -34,7 +34,6 @@ static const wxColour g_text_color = wxColour(107, 107, 107, 255); #define BTN_SIZE wxSize(FromDIP(58), FromDIP(24)) #define BTN_GAP FromDIP(20) #define TEXT_BEG_PADDING FromDIP(30) -#define MAX_FLUSH_VALUE 9999 #define MIN_WIPING_DIALOG_WIDTH FromDIP(300) #define TIP_MESSAGES_PADDING FromDIP(8) @@ -498,11 +497,7 @@ WipingPanel::WipingPanel(wxWindow* parent, const std::vector& matrix, con edit_boxes[i][j]->Bind(wxEVT_TEXT, [this, i, j](wxCommandEvent& e) { wxString str = edit_boxes[i][j]->GetValue(); int value = wxAtoi(str); - if (value > MAX_FLUSH_VALUE) { - str = wxString::Format(("%d"), MAX_FLUSH_VALUE); - edit_boxes[i][j]->SetValue(str); - } - else if (value < 0) { + if (value < 0) { edit_boxes[i][j]->SetValue(wxString("0")); } }); From 7a50acb60769c2c509704ba1307a57e19b377223 Mon Sep 17 00:00:00 2001 From: mitt3n <102060045+mitt3n@users.noreply.github.com> Date: Wed, 9 Apr 2025 07:52:18 -0500 Subject: [PATCH 3/5] 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." --- src/slic3r/GUI/WipeTowerDialog.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/WipeTowerDialog.cpp b/src/slic3r/GUI/WipeTowerDialog.cpp index a164b4ab0a..48be6dc999 100644 --- a/src/slic3r/GUI/WipeTowerDialog.cpp +++ b/src/slic3r/GUI/WipeTowerDialog.cpp @@ -34,6 +34,7 @@ static const wxColour g_text_color = wxColour(107, 107, 107, 255); #define BTN_SIZE wxSize(FromDIP(58), FromDIP(24)) #define BTN_GAP FromDIP(20) #define TEXT_BEG_PADDING FromDIP(30) +#define MAX_FLUSH_VALUE 2147483520 #define MIN_WIPING_DIALOG_WIDTH FromDIP(300) #define TIP_MESSAGES_PADDING FromDIP(8) @@ -497,7 +498,12 @@ WipingPanel::WipingPanel(wxWindow* parent, const std::vector& matrix, con edit_boxes[i][j]->Bind(wxEVT_TEXT, [this, i, j](wxCommandEvent& e) { wxString str = edit_boxes[i][j]->GetValue(); int value = wxAtoi(str); - if (value < 0) { + + if (value > MAX_FLUSH_VALUE) { + str = wxString::Format(("%d"), MAX_FLUSH_VALUE); + edit_boxes[i][j]->SetValue(str); + } + else if (value < 0) { edit_boxes[i][j]->SetValue(wxString("0")); } }); From e97d9f5f1738349fcca50565f40e7f37f78d3292 Mon Sep 17 00:00:00 2001 From: mitt3n <102060045+mitt3n@users.noreply.github.com> Date: Wed, 9 Apr 2025 08:01:32 -0500 Subject: [PATCH 4/5] 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." --- src/slic3r/GUI/WipeTowerDialog.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/slic3r/GUI/WipeTowerDialog.cpp b/src/slic3r/GUI/WipeTowerDialog.cpp index 48be6dc999..59e27d493a 100644 --- a/src/slic3r/GUI/WipeTowerDialog.cpp +++ b/src/slic3r/GUI/WipeTowerDialog.cpp @@ -498,7 +498,6 @@ WipingPanel::WipingPanel(wxWindow* parent, const std::vector& matrix, con edit_boxes[i][j]->Bind(wxEVT_TEXT, [this, i, j](wxCommandEvent& e) { wxString str = edit_boxes[i][j]->GetValue(); int value = wxAtoi(str); - if (value > MAX_FLUSH_VALUE) { str = wxString::Format(("%d"), MAX_FLUSH_VALUE); edit_boxes[i][j]->SetValue(str); From 267d81e9cc533b1c4fef9477f24c1cc36a61cefd Mon Sep 17 00:00:00 2001 From: mitt3n <102060045+mitt3n@users.noreply.github.com> Date: Wed, 9 Apr 2025 08:03:40 -0500 Subject: [PATCH 5/5] 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." --- src/slic3r/GUI/WipeTowerDialog.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/slic3r/GUI/WipeTowerDialog.cpp b/src/slic3r/GUI/WipeTowerDialog.cpp index 59e27d493a..ce2fd92e39 100644 --- a/src/slic3r/GUI/WipeTowerDialog.cpp +++ b/src/slic3r/GUI/WipeTowerDialog.cpp @@ -498,11 +498,11 @@ WipingPanel::WipingPanel(wxWindow* parent, const std::vector& matrix, con edit_boxes[i][j]->Bind(wxEVT_TEXT, [this, i, j](wxCommandEvent& e) { wxString str = edit_boxes[i][j]->GetValue(); int value = wxAtoi(str); - if (value > MAX_FLUSH_VALUE) { - str = wxString::Format(("%d"), MAX_FLUSH_VALUE); - edit_boxes[i][j]->SetValue(str); - } - else if (value < 0) { + if (value > MAX_FLUSH_VALUE) { + str = wxString::Format(("%d"), MAX_FLUSH_VALUE); + edit_boxes[i][j]->SetValue(str); + } + else if (value < 0) { edit_boxes[i][j]->SetValue(wxString("0")); } });