Project

General

Profile

Bug #4767

WPopupMenu in WTableView

Added by Max Quatember over 6 years ago. Updated about 6 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
#1

Updated by Koen Deforche over 6 years ago

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

Updated by Stefano Martini about 6 years ago

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

#3

Updated by Max Quatember about 6 years ago

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

#4

Updated by Koen Deforche about 6 years ago

  • Target version set to 3.3.6
#5

Updated by Koen Deforche about 6 years ago

  • Status changed from InProgress to Implemented @Emweb
#6

Updated by Koen Deforche about 6 years ago

  • Status changed from Implemented @Emweb to Closed

Also available in: Atom PDF