Bug #8135

WMenu submenu itemselected

Added by Jan Hrubeš almost 2 years ago. Updated 12 months ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:


this is regression of an 10 years old issue. When using a two-level menu, then the selection is not properly propagated to the parent menu.
Thus ".itemselected .itemselected" css selector do not work.
I have found it in issues #694, #1037 and question .
The regression is in wt4 branch, I have tested it on wt 4.4.0.

Example attached.


helloMenu.cpp (2.21 KB) helloMenu.cpp Jan Hrubeš, 02/24/2021 09:48 AM
helloMenu.cpp (3.38 KB) helloMenu.cpp added workaround Jan Hrubeš, 03/10/2021 07:40 PM

Updated by Korneel Dumon over 1 year ago

  • Status changed from New to InProgress
  • Assignee set to Korneel Dumon

can you point me to a revision where you still get the old behavior?
I worry about simply selecting the parent item, since that would trigger another itemSelected() signal. Seems to me that might break some code.


Updated by Jan Hrubeš over 1 year ago

I am migrating from wt-3.2.3 to wt-4.4.0.

I have written a little workaround (see attachment) with a call "select()" on parent menu item (yes, itemSelected() is triggered).
Also when top menu item is selected, then an item in submenu is selected too.
Wt handle when selection do not change (in WMenu::select()) so no infinite calling one from another occurs.
Sequence of actions can be observed with some trace logging (not included).


Updated by Roel Standaert over 1 year ago

  • Status changed from InProgress to Implemented @Emweb
  • Target version set to 4.6.0

Updated by Roel Standaert over 1 year ago

  • Status changed from Implemented @Emweb to Resolved

Updated by Roel Standaert over 1 year ago

  • % Done changed from 0 to 100

Updated by Roel Standaert 12 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF