--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/ui/canvas.cpp Thu Feb 06 23:41:20 2020 +0200 @@ -0,0 +1,19 @@ +#include <QMouseEvent> +#include "canvas.h" + +Canvas::Canvas( + Model* model, + DocumentManager* documents, + const ldraw::ColorTable& colorTable, + QWidget* parent) : + PartRenderer{model, documents, colorTable, parent} +{ + this->setMouseTracking(true); +} + +void Canvas::mouseMoveEvent(QMouseEvent* event) +{ + const ldraw::Id id = this->pick(event->pos()); + this->newStatusText("Selected: %1"_q.arg(id.value)); + PartRenderer::mouseMoveEvent(event); +}