src/canvas.cpp

changeset 1110
ec3ee7da7806
parent 1108
90d6f4b7782e
child 1123
15e46ea3151f
--- 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();
+}

mercurial