Project

General

Profile

Bug #1515

WMenu callback redundance

Added by Jan HrubeŇ° almost 8 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
11/08/2012
Due date:
% Done:

0%

Estimated time:

Description

Hi,

WMenu with submenu and with setInternalPathEnabled suffers with multiple emitting of signal itemSelected, when an item in the submenu is selected.

It is caused because of internal path handling.

Imagine this simple two-level menu

+ ItemA
|-- ItemA1
|-- ItemA2

When ItemA1 is selected, then itemSelected signal is emited from subMenu (1). Then internal path is changed (2) and itemSelected signals for menu (3) and submenu (4) respectively are emited.

[2012-Nov-08 14:34:13.920099] 2597 [/ runm4qpxQSqeyVpW] [test] "ItemA1"             // (1)
[2012-Nov-08 14:34:13.921730] 2597 [/ runm4qpxQSqeyVpW] [test] "/itema/itema1"      // (2)
[2012-Nov-08 14:34:13.923400] 2597 [/ runm4qpxQSqeyVpW] [test] "ItemA"              // (3)
[2012-Nov-08 14:34:13.924844] 2597 [/ runm4qpxQSqeyVpW] [test] "ItemA1"             // (4)

That is inefficient. Consider some computation and updating of contents for each call of my handler of itemSelected signal. Tho log should contain just lines 1 a 2 (maybe 2 and 4 would be fine too).

The log is from example from attached file.

Tested with wt 3.2.3.

regards,

Jan


Files

testMenu.cpp (2.95 KB) testMenu.cpp program demonstrating the issue Jan HrubeŇ°, 11/08/2012 04:27 PM
#1

Updated by Koen Deforche almost 8 years ago

  • Status changed from New to InProgress
  • Assignee set to Koen Deforche
#2

Updated by Koen Deforche over 7 years ago

  • Status changed from InProgress to Resolved
  • Target version set to 3.3.0
#3

Updated by Koen Deforche over 7 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF