src/layers/edittools.cpp

changeset 316
aab8e139a149
parent 315
23b47902d857
child 319
9727e545b0bc
--- a/src/layers/edittools.cpp	Sat Jul 02 19:03:57 2022 +0300
+++ b/src/layers/edittools.cpp	Sat Jul 02 19:05:05 2022 +0300
@@ -401,11 +401,11 @@
 		}
 		break;
 	case CircleMode:
-		if (event->button() == Qt::LeftButton and this->worldPosition.has_value()) {
+		if (event->button() == Qt::LeftButton) {
 			if (this->polygon.size() == 3) {
 				this->closeShape();
 			}
-			else {
+			else if (this->worldPosition.has_value()) {
 				this->polygon.push_back(*this->worldPosition);
 			}
 		}

mercurial