Project

General

Profile

Actions

Bug #12407

open

clearing the selection in a submenu affects the parent menu

Added by jeroen zpam 10 months ago. Updated 10 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
02/13/2024
Due date:
% Done:

0%

Estimated time:

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

hello.cpp (5.02 KB) hello.cpp jeroen zpam, 02/14/2024 09:33 AM
Actions #1

Updated by jeroen zpam 10 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); ??

Actions

Also available in: Atom PDF