Allow make a cylinder even if the world position is not on grid

Sat, 02 Jul 2022 19:05:05 +0300

author
Teemu Piippo <teemu.s.piippo@gmail.com>
date
Sat, 02 Jul 2022 19:05:05 +0300
changeset 316
aab8e139a149
parent 315
23b47902d857
child 317
852021f38b66

Allow make a cylinder even if the world position is not on grid

src/layers/edittools.cpp file | annotate | diff | comparison | revisions
--- 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