Skip to content

Commit 8e45d82

Browse files
committed
If we're handling the E-axis, the back button might end on that screen. Show that we didn't forget the settings. #189
1 parent 5574d97 commit 8e45d82

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Marlin/src/lcd/extui/lib/dgus_creality/creality_touch/AxisSettingsHandler.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include "../DGUSDisplay.h"
88
#include "../DGUSScreenHandler.h"
99

10+
#include "EstepsHandler.h"
1011
#include "AxisSettingsHandler.h"
1112

1213
#include "../../../ui_api.h"
@@ -144,6 +145,12 @@ void AxisSettingsHandler::HandleBackNavigation(DGUS_VP_Variable &var, void *val_
144145
IF_ENABLED(CLASSIC_JERK, planner.max_jerk[current_axis] = jerk);
145146
planner.settings.max_feedrate_mm_s[current_axis] = max_feedrate;
146147

148+
// If we're handling the E-axis, the back button might end on that screen. Show that we didn't forget the settings.
149+
if (current_axis == E_AXIS) {
150+
EstepsHandler::set_esteps = axis_steps_mm;
151+
EstepsHandler::calculated_esteps = axis_steps_mm;
152+
}
153+
147154
#if HAS_TRINAMIC_CONFIG
148155
switch (current_axis){
149156
#if AXIS_IS_TMC(X)

0 commit comments

Comments
 (0)