Project

General

Profile

Actions

Bug #4767

closed

WPopupMenu in WTableView

Added by Max Quatember almost 9 years ago. Updated over 8 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
Actions #1

Updated by Koen Deforche almost 9 years ago

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

Updated by Stefano Martini over 8 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

Actions #3

Updated by Max Quatember over 8 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

Actions #4

Updated by Koen Deforche over 8 years ago

  • Target version set to 3.3.6
Actions #5

Updated by Koen Deforche over 8 years ago

  • Status changed from InProgress to Implemented @Emweb
Actions #6

Updated by Koen Deforche over 8 years ago

  • Status changed from Implemented @Emweb to Closed
Actions

Also available in: Atom PDF