src/tools/selecttool.cpp

changeset 107
02f142b399b1
parent 96
165777a20dc7
child 111
1f42c03fafca
--- a/src/tools/selecttool.cpp	Tue Jul 20 01:22:01 2021 +0300
+++ b/src/tools/selecttool.cpp	Sat Jul 24 01:50:38 2021 +0300
@@ -14,3 +14,14 @@
 	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;
+}

mercurial