Project

General

Profile

Actions

Bug #4767

closed
MQ KD

WPopupMenu in WTableView

Bug #4767: WPopupMenu in WTableView

Added by Max Quatember over 10 years ago. Updated about 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
02/25/2016
Due date:
% Done:

0%

Estimated time:

Description

Hi Wt-Team,

If i trigger a WPopupMenu from within mouseWentUp signal in WTableView I can trigger multiple menus.
I think that the previous opend should disappear after the second right-click.

Please see attached testcase.

If you right click on "0, 0" and then on "0, 1" then you get two "x".

best regards,
Max


Files

test.cpp (1.27 KB) test.cpp Max Quatember, 02/25/2016 11:55 AM
screenshot.png (1.71 KB) screenshot.png Max Quatember, 05/18/2016 09:53 AM

KD Updated by Koen Deforche over 10 years ago Actions #1

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

SM Updated by Stefano Martini over 10 years ago Actions #2

Hi Max,
You can make you code working by modifing the ShowPopupMenu method in this way:

void ShowPopupMenu( const Wt::WModelIndex& item, const Wt::WMouseEvent& e ) {
if (e.button() == WMouseEvent::RightButton) {
Wt::WPopupMenu* popup = new Wt::WPopupMenu;
popup->addItem( "x" );
popup->popup( e );
}
}

Remember to destroy popup when you do not need it.

Hope this help
Stefano

MQ Updated by Max Quatember over 10 years ago Actions #3

Hi Stefano!

Thanks, but this does not change the fact, that you can trigger multiple WPopupMenus within the WTableWidget.
To make it clearer I attached a screenshot.

Best regards,
Max

KD Updated by Koen Deforche over 10 years ago Actions #4

  • Target version set to 3.3.6

KD Updated by Koen Deforche over 10 years ago Actions #5

  • Status changed from InProgress to Implemented @Emweb

KD Updated by Koen Deforche about 10 years ago Actions #6

  • Status changed from Implemented @Emweb to Closed
Actions

Also available in: PDF Atom