src/tools/selecttool.cpp

changeset 107
02f142b399b1
parent 96
165777a20dc7
child 111
1f42c03fafca
equal deleted inserted replaced
106:128efb9d148b 107:02f142b399b1
12 QString SelectTool::toolTip() const 12 QString SelectTool::toolTip() const
13 { 13 {
14 static const QString result = tr("Select elements from the model."); 14 static const QString result = tr("Select elements from the model.");
15 return result; 15 return result;
16 } 16 }
17
18 bool SelectTool::mouseClick(const Canvas::MouseClickInfo& info)
19 {
20 const ldraw::id_t highlighted = info.invoker->getHighlightedObject();
21 info.invoker->clearSelection();
22 if (highlighted != ldraw::NULL_ID)
23 {
24 info.invoker->addToSelection(highlighted);
25 }
26 return true;
27 }

mercurial