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 } |