--- a/src/canvas.cpp Thu Feb 09 19:32:41 2017 +0200 +++ b/src/canvas.cpp Thu Feb 09 19:57:43 2017 +0200 @@ -309,4 +309,15 @@ int ry = (((position3d[axisY] * signY) - virtualHeight() + panning(Y)) * height()) / (2 * virtualHeight()); return {rx, -ry}; } -} \ No newline at end of file +} + +void Canvas::contextMenuEvent(QContextMenuEvent* event) +{ + m_window->spawnContextMenu(event->globalPos()); +} + +void Canvas::dragEnterEvent(QDragEnterEvent* event) +{ + if (m_window and event->source() == m_window->getPrimitivesTree() and m_window->getPrimitivesTree()->currentItem()) + event->acceptProposedAction(); +}