Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix value edit click bug #3116

Merged

Conversation

thinkyhead
Copy link
Member

Expected behavior: After editing a value the menu should return to the previous point with the same item previously selected.

Actual behavior: Either the top (back) item is selected, or the menu jumps up another level.

Causes: (1) Wrong arguments are being passed to lcd_goto_menu on click when editing a value. (2) Menus are just exiting with lcd_goto_menu.

Solution: (1) Pass the correct arguments to lcd_goto_menu(prevMenu, ...) to get feedback and set the encoder position. (2) Allow submenu (leaf) items to go back to origin. (3) Have all edit items go back to origin.

Future considerations: It should be possible, adding a small array, to make a more general paging system, so a page can just go "up a level" when exiting and doesn't need an explicit lcd_goto_menu call. Also, the "back" label on a page could be determined by its parent, allowing more than one entry- and exit-point for a page.

Naming conventions: It would be good to rename "menu" to "screen" or "page" and use that term in place of "menu" for those pages which aren't menu pages. This way we can think more generally about other kinds of pages, such as wizards, status screens, value editing pages, etc.

Expected behavior: After editing a value the menu should return to the
previous place with the edited item selected.
Actual behavior: Either the top (back) item from the previous screen is
selected, or the menu jumps up another level.
Solution: Pass the correct arguments to `lcd_goto_menu` on click when
editing a value.
@thinkyhead thinkyhead force-pushed the rc_fix_value_edit_bug branch from 4188c25 to b45a0c4 Compare March 10, 2016 05:07
thinkyhead added a commit that referenced this pull request Mar 13, 2016
@thinkyhead thinkyhead merged commit f4a3efd into MarlinFirmware:RCBugFix Mar 13, 2016
@thinkyhead thinkyhead deleted the rc_fix_value_edit_bug branch March 24, 2016 07:44
@jbrazio jbrazio modified the milestone: 1.1.0 Jul 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants