Skip to content

Commit

Permalink
Menu item index followup
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Dec 28, 2020
1 parent a3fac74 commit a8c361c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Marlin/src/lcd/menu/menu_filament.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,20 +86,20 @@ inline PGM_P change_filament_header(const PauseMode mode) {
void _menu_temp_filament_op(const PauseMode mode, const int8_t extruder) {
_change_filament_mode = mode;
_change_filament_extruder = extruder;
const int8_t old_index = MenuItemBase::itemIndex;

This comment has been minimized.

Copy link
@rhapsodyv

rhapsodyv Dec 28, 2020

Member

the index is received on the extruder parameter... that is the reason I originally just set it to the extruder.....

START_MENU();
if (LCD_HEIGHT >= 4) STATIC_ITEM_P(change_filament_header(mode), SS_DEFAULT|SS_INVERT);
BACK_ITEM(MSG_BACK);
#if PREHEAT_COUNT
const int8_t old_index = MenuItemBase::itemIndex;
LOOP_L_N(m, PREHEAT_COUNT)
ACTION_ITEM_N_S(m, ui.get_preheat_label(m), MSG_PREHEAT_M, _change_filament_with_preset);
MenuItemBase::itemIndex = old_index;
#endif
EDIT_ITEM_FAST_N(int3, extruder, MSG_PREHEAT_CUSTOM, &thermalManager.temp_hotend[extruder].target,
EXTRUDE_MINTEMP, thermalManager.heater_maxtemp[extruder] - HOTEND_OVERSHOOT,
_change_filament_with_custom
);
END_MENU();
MenuItemBase::itemIndex = old_index;
}

/**
Expand Down

0 comments on commit a8c361c

Please sign in to comment.