Bug #12407
openclearing the selection in a submenu affects the parent menu
0%
Description
we have menus with normal items and submenus. in the itemSelected handler we clear the selection of the submenus calling select(-1) when the submenu is no longer selected.
until wt-4.5.2 this works fine, since wt-4.6.0 this select(-1) on the submenu makes the submenu selected again.
Files
Updated by jeroen zpam 9 months ago
attached an example, the stdout shows the issue
press item xxxx wt4-10-3:
hello.cpp 65: nested 1 apSubMenuItem xxxx inSubMenu false isMenu false
hello.cpp 72
hello.cpp 65: nested 2 apSubMenuItem submenu inSubMenu false isMenu true
hello.cpp 72
hello.cpp 76
hello.cpp 65: nested 3 apSubMenuItem abc inSubMenu true isMenu false
hello.cpp 71
hello.cpp 75
hello.cpp 80: submenu 1
hello.cpp 80: submenu 1
hello.cpp 80: submenu 1
press item xxxx wt4-5-2:
hello.cpp 65: nested 1 apSubMenuItem xxxx inSubMenu false isMenu false
hello.cpp 72
hello.cpp 82: xxxx 0
workaround: uncommented the line //if (nested == 1) and at the end of the if clause call apSubMenu->select(apSubMenuItem); ??