Sun, 25 Jul 2021 16:26:38 +0300
replaced preview layers in favor of overpainting callback
#include "selecttool.h" SelectTool::SelectTool(QObject* parent) : BaseTool{parent} {} QString SelectTool::name() const { static const QString result = tr("Select"); return result; } QString SelectTool::toolTip() const { static const QString result = tr("Select elements from the model."); return result; } bool SelectTool::mouseClick(const Canvas::MouseClickInfo& info) { const ldraw::id_t highlighted = info.invoker->getHighlightedObject(); info.invoker->clearSelection(); if (highlighted != ldraw::NULL_ID) { info.invoker->addToSelection(highlighted); } return true; }