290 void EditTools::mouseClick(const QMouseEvent* event) |
290 void EditTools::mouseClick(const QMouseEvent* event) |
291 { |
291 { |
292 switch(this->mode) { |
292 switch(this->mode) { |
293 case SelectMode: |
293 case SelectMode: |
294 if (event->button() == Qt::LeftButton) { |
294 if (event->button() == Qt::LeftButton) { |
295 const ElementId highlighted = this->renderer->pick(event->pos()); |
295 const std::int32_t highlighted = this->renderer->pick(event->pos()); |
296 Q_EMIT this->select({highlighted}, false); |
296 Q_EMIT this->select({highlighted}, false); |
297 } |
297 } |
298 break; |
298 break; |
299 case DrawMode: |
299 case DrawMode: |
300 if (event->button() == Qt::LeftButton and this->worldPosition.has_value()) { |
300 if (event->button() == Qt::LeftButton and this->worldPosition.has_value()) { |