Community
Participate
Working Groups
Because super.dispatchMouseReleased(me); triggers creation of a new MouseEvent as currentEvent after dispatching the consumed state of the dispatched mouseevent is lost, hence draw2dBusy() will always return false. The domain will receive the released event no matter what. /** * @see EventDispatcher#dispatchMouseReleased(org.eclipse.swt.events.MouseEvent) */ public void dispatchMouseReleased(org.eclipse.swt.events.MouseEvent me) { if (!editorCaptured) { super.dispatchMouseReleased(me); if (draw2dBusy()) return; } if (okToDispatch()) { setRouteEventsToEditor(false); domain.mouseUp(me, viewer); updateFigureUnderCursor(me); } }
Can you describe how this problem would realize itself in a real use-case? i.e. is the problem reproducible in Logic designer example or other?
I created a glass layer (working in layeredpane) ala swings GlassPane that grabs all events when its active. It makes sure all events are consumed by the glasspane so it doesnt end up in the domain or figures. I could workaround it, but it seems like a bug in the implementation. The event upon mouse release can't be prevented from reaching the tool while all other events can.