src/layers/edittools.cpp

changeset 383
530d23cd4e97
parent 379
8d88adffb779
equal deleted inserted replaced
382:94d5587bb0c4 383:530d23cd4e97
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()) {

mercurial