src/layers/edittools.cpp

changeset 316
aab8e139a149
parent 315
23b47902d857
child 319
9727e545b0bc
equal deleted inserted replaced
315:23b47902d857 316:aab8e139a149
399 this->polygon.push_back(*this->worldPosition); 399 this->polygon.push_back(*this->worldPosition);
400 } 400 }
401 } 401 }
402 break; 402 break;
403 case CircleMode: 403 case CircleMode:
404 if (event->button() == Qt::LeftButton and this->worldPosition.has_value()) { 404 if (event->button() == Qt::LeftButton) {
405 if (this->polygon.size() == 3) { 405 if (this->polygon.size() == 3) {
406 this->closeShape(); 406 this->closeShape();
407 } 407 }
408 else { 408 else if (this->worldPosition.has_value()) {
409 this->polygon.push_back(*this->worldPosition); 409 this->polygon.push_back(*this->worldPosition);
410 } 410 }
411 } 411 }
412 break; 412 break;
413 } 413 }

mercurial