Project

General

Profile

Bug #3534

WMenuItem setDraggable and mouseWentUp inkompatible

Added by Florian Ransmayr almost 8 years ago. Updated almost 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
08/20/2014
Due date:
% Done:

0%

Estimated time:

Description

Hi there,

maybe there is a bug using a WMenuItem in combination with setDraggable and mouseWentUp signal. Both of the features are working fine if they are used separately. I want to be able to drag the items of a WMenu and at the same time have a context menu.

Maybe this is the same/similar to http://redmine.webtoolkit.eu/issues/3170. I couldn't really figure out the important changes of this bug fix ;(

I am doing something like the following code snippet

Wt::WContainerWidget *container = new Wt::WContainerWidget();

// Create a stack where the contents will be located.
Wt::WStackedWidget *contents = new Wt::WStackedWidget();

Wt::WMenu *menu = new Wt::WMenu(contents, Wt::Vertical, container);

Wt::WMenuItem *item = menu->addItem("Test", new Wt::WTextArea("Test Text"));

item->mouseWentUp().connect(...);
item->setDraggable("testmime", new Wt::WImage("resources/items-ok.gif"), true);

With this code and Wt version 3.3.1 it worked like expected. The menu items could be dragged around and they had a context menu. After switching to the current git version the drag operation is still available but the context menu stops working.

I would appreciate any help solving this issue.

Thanks in advance

Florian


Files

hello.C (2.7 KB) hello.C Florian Ransmayr, 08/26/2014 01:35 PM

Also available in: Atom PDF