| 297 void EditTools::mouseClick(const QMouseEvent* event) |
297 void EditTools::mouseClick(const QMouseEvent* event) |
| 298 { |
298 { |
| 299 switch(this->mode) { |
299 switch(this->mode) { |
| 300 case SelectMode: |
300 case SelectMode: |
| 301 if (event->button() == Qt::LeftButton) { |
301 if (event->button() == Qt::LeftButton) { |
| 302 const ModelId highlighted = this->renderer->pick(event->pos()); |
302 const ElementId highlighted = this->renderer->pick(event->pos()); |
| 303 Q_EMIT this->select({highlighted}, false); |
303 Q_EMIT this->select({highlighted}, false); |
| 304 } |
304 } |
| 305 break; |
305 break; |
| 306 case DrawMode: |
306 case DrawMode: |
| 307 if (event->button() == Qt::LeftButton and this->worldPosition.has_value()) { |
307 if (event->button() == Qt::LeftButton and this->worldPosition.has_value()) { |