291 { |
291 { |
292 switch(this->mode) { |
292 switch(this->mode) { |
293 case editing_mode_e::select: |
293 case editing_mode_e::select: |
294 if (event->button() == Qt::LeftButton) { |
294 if (event->button() == Qt::LeftButton) { |
295 const std::int32_t 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->modelAction(SelectInModel{static_cast<size_t>(highlighted)}); |
297 } |
297 } |
298 break; |
298 break; |
299 case editing_mode_e::draw: |
299 case editing_mode_e::draw: |
300 if (event->button() == Qt::LeftButton and this->worldPosition.has_value()) { |
300 if (event->button() == Qt::LeftButton and this->worldPosition.has_value()) { |
301 if (this->inputPolygon.currentPointOnExistingPoint()) { |
301 if (this->inputPolygon.currentPointOnExistingPoint()) { |