Browse Source

Move Cancel Object menu, fix canceled item index (#18930)

swissnorp 4 years ago
parent
commit
6da477e6bf
No account linked to committer's email address

+ 0
- 5
Marlin/src/lcd/menu/menu_advanced.cpp View File

53
 
53
 
54
 void menu_tmc();
54
 void menu_tmc();
55
 void menu_backlash();
55
 void menu_backlash();
56
-void menu_cancelobject();
57
 
56
 
58
 #if ENABLED(DAC_STEPPER_CURRENT)
57
 #if ENABLED(DAC_STEPPER_CURRENT)
59
 
58
 
560
     SUBMENU(MSG_BACKLASH, menu_backlash);
559
     SUBMENU(MSG_BACKLASH, menu_backlash);
561
   #endif
560
   #endif
562
 
561
 
563
-  #if ENABLED(CANCEL_OBJECTS)
564
-    SUBMENU(MSG_CANCEL_OBJECT, []{ editable.int8 = -1; ui.goto_screen(menu_cancelobject); });
565
-  #endif
566
-
567
   #if ENABLED(DAC_STEPPER_CURRENT)
562
   #if ENABLED(DAC_STEPPER_CURRENT)
568
     SUBMENU(MSG_DRIVE_STRENGTH, menu_dac);
563
     SUBMENU(MSG_DRIVE_STRENGTH, menu_dac);
569
   #endif
564
   #endif

+ 1
- 1
Marlin/src/lcd/menu/menu_cancelobject.cpp View File

43
   };
43
   };
44
   MenuItem_confirm::confirm_screen(
44
   MenuItem_confirm::confirm_screen(
45
     []{
45
     []{
46
-      cancelable.cancel_object(MenuItemBase::itemIndex - 1);
46
+      cancelable.cancel_object(MenuItemBase::itemIndex);
47
       ui.completion_feedback();
47
       ui.completion_feedback();
48
       ui.goto_previous_screen();
48
       ui.goto_previous_screen();
49
     },
49
     },

+ 6
- 0
Marlin/src/lcd/menu/menu_main.cpp View File

51
 #endif
51
 #endif
52
 
52
 
53
 void menu_tune();
53
 void menu_tune();
54
+void menu_cancelobject();
54
 void menu_motion();
55
 void menu_motion();
55
 void menu_temperature();
56
 void menu_temperature();
56
 void menu_configuration();
57
 void menu_configuration();
110
         );
111
         );
111
       });
112
       });
112
     #endif
113
     #endif
114
+
113
     SUBMENU(MSG_TUNE, menu_tune);
115
     SUBMENU(MSG_TUNE, menu_tune);
116
+
117
+    #if ENABLED(CANCEL_OBJECTS) && DISABLED(SLIM_LCD_MENUS)
118
+      SUBMENU(MSG_CANCEL_OBJECT, []{ editable.int8 = -1; ui.goto_screen(menu_cancelobject); });
119
+    #endif
114
   }
120
   }
115
   else {
121
   else {
116
 
122
 

Loading…
Cancel
Save