Project

General

Profile

Actions

Bug #12407

closed
JZ RM

clearing the selection in a submenu affects the parent menu

Bug #12407: clearing the selection in a submenu affects the parent menu

Added by jeroen zpam over 2 years ago. Updated 3 months ago.

Status:
Closed
Priority:
Normal
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

JZ Updated by jeroen zpam over 2 years ago Actions #1

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); ??

MV Updated by Matthias Van Ceulebroeck 11 months ago Actions #2

  • Target version set to 4.13.2

RM Updated by Romain Mardulyn 11 months ago Actions #3

  • Status changed from New to InProgress
  • Assignee set to Romain Mardulyn

RM Updated by Romain Mardulyn 11 months ago Actions #4

  • Status changed from InProgress to Review
  • Assignee deleted (Romain Mardulyn)

RM Updated by Romain Mardulyn 5 months ago Actions #5

  • Target version changed from 4.13.2 to 4.13.3

MV Updated by Matthias Van Ceulebroeck 4 months ago Actions #6

  • Assignee set to Matthias Van Ceulebroeck

RM Updated by Romain Mardulyn 4 months ago Actions #7

  • Status changed from Review to Implemented @Emweb
  • Assignee changed from Matthias Van Ceulebroeck to Romain Mardulyn

RM Updated by Romain Mardulyn 3 months ago Actions #8

  • Status changed from Implemented @Emweb to Closed
Actions

Also available in: PDF Atom