circlemode: don't wait for the last click

Thu, 04 Jan 2018 19:21:46 +0200

author
Santeri Piippo
date
Thu, 04 Jan 2018 19:21:46 +0200
changeset 1213
f2827b16f941
parent 1012
413ecd6b9801
child 1214
fed9aacd1fab

circlemode: don't wait for the last click

src/editmodes/circleMode.cpp file | annotate | diff | comparison | revisions
--- a/src/editmodes/circleMode.cpp	Wed Nov 18 19:05:22 2015 +0200
+++ b/src/editmodes/circleMode.cpp	Thu Jan 04 19:21:46 2018 +0200
@@ -298,20 +298,18 @@
 
 bool CircleMode::mouseReleased (MouseEventData const& data)
 {
-	if (Super::mouseReleased (data))
-		return true;
-
 	if (data.releasedButtons & Qt::LeftButton)
 	{
-		if (m_drawedVerts.size() < 3)
+		if (m_drawedVerts.size() < 2)
 			addDrawnVertex (renderer()->position3D());
 		else
 			buildCircle();
-
 		return true;
 	}
-
-	return false;
+	else
+	{
+		return Super::mouseReleased(data);
+	}
 }
 
 bool CircleMode::preAddVertex (const Vertex&)

mercurial