Fix right click to delete not really working properly

Fri, 01 Jul 2022 16:46:43 +0300

author
Teemu Piippo <teemu.s.piippo@gmail.com>
date
Fri, 01 Jul 2022 16:46:43 +0300
changeset 312
2637134bc37c
parent 311
fab454611f9b
child 313
c24d87f64bed

Fix right click to delete not really working properly
Instead of removing the point that had been added, it would remove
the point that is being drawn, which would cause it to overwrite the
previous point using the new point, causing a bit of a delay

src/layers/edittools.cpp file | annotate | diff | comparison | revisions
--- a/src/layers/edittools.cpp	Fri Jul 01 16:45:40 2022 +0300
+++ b/src/layers/edittools.cpp	Fri Jul 01 16:46:43 2022 +0300
@@ -283,7 +283,7 @@
 void EditTools::removeLastPoint()
 {
 	if (this->polygon.size() > 1) {
-		this->polygon.erase(this->polygon.end() - 1);
+		this->polygon.erase(this->polygon.end() - 2);
 	}
 }
 

mercurial