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 |
17 |
18 bool SelectTool::mouseClick(const Canvas::MouseClickInfo& info) |
18 bool SelectTool::mouseClick(Document* document, Canvas* canvas) |
19 { |
19 { |
20 const ldraw::id_t highlighted = info.invoker->getHighlightedObject(); |
20 static_cast<void>(document); |
21 info.invoker->clearSelection(); |
21 const ldraw::id_t highlighted = canvas->getHighlightedObject(); |
|
22 canvas->clearSelection(); |
22 if (highlighted != ldraw::NULL_ID) |
23 if (highlighted != ldraw::NULL_ID) |
23 { |
24 { |
24 info.invoker->addToSelection(highlighted); |
25 canvas->addToSelection(highlighted); |
25 } |
26 } |
26 return true; |
27 return true; |
27 } |
28 } |