Bug #4767
closedWPopupMenu in WTableView
0%
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
Updated by Koen Deforche over 8 years ago
- Status changed from New to InProgress
- Assignee set to Koen Deforche
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
Updated by Max Quatember over 8 years ago
- File screenshot.png screenshot.png added
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
Updated by Koen Deforche over 8 years ago
- Status changed from InProgress to Implemented @Emweb
Updated by Koen Deforche over 8 years ago
- Status changed from Implemented @Emweb to Closed