X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/42cfaf8cd4464466398ed888cb2caa5ee360c7ef..35c9d9582be4ebea40251378e95fdbbfe6b8ce73:/utils/ogl/src/canvas.cpp diff --git a/utils/ogl/src/canvas.cpp b/utils/ogl/src/canvas.cpp index d0ca4ee7c8..edc898be23 100644 --- a/utils/ogl/src/canvas.cpp +++ b/utils/ogl/src/canvas.cpp @@ -24,11 +24,9 @@ #include #endif -#ifdef PROLOGIO #include -#endif -#if USE_IOSTREAMH +#if wxUSE_IOSTREAMH #include #else #include @@ -122,8 +120,8 @@ void wxShapeCanvas::OnMouseEvent(wxMouseEvent& event) // from, this may not be an intentional drag at all. if (dragging) { - int dx = abs(dc.LogicalToDeviceX(x - m_firstDragX)); - int dy = abs(dc.LogicalToDeviceY(y - m_firstDragY)); + int dx = abs(dc.LogicalToDeviceX((long) (x - m_firstDragX))); + int dy = abs(dc.LogicalToDeviceY((long) (y - m_firstDragY))); if (m_checkTolerance && (dx <= GetDiagram()->GetMouseTolerance()) && (dy <= GetDiagram()->GetMouseTolerance())) { return; @@ -275,6 +273,13 @@ void wxShapeCanvas::OnMouseEvent(wxMouseEvent& event) m_draggedShape = NULL; m_dragState = NoDragging; } + else if (event.LeftDClick()) + { + nearest_object->GetEventHandler()->OnLeftDoubleClick((double)x, (double)y, keys, attachment); + + m_draggedShape = NULL; + m_dragState = NoDragging; + } else if (event.RightDown()) { m_draggedShape = nearest_object;