Clone in a terminal:
Commit 8fbc895
Johan Mattsson - 2012-08-28T12:28:51+00:00
8fbc895c952811fa9980e4ac2d20b85f4623b62ejohan.mattsson.m@gmail.com

fix some minor warnings caught by test cases

Changed files (2)

Diff

diff --git a/src/Path.vala b/src/Path.valaindex b0a3b9f..ff768f1 100644--- a/src/Path.vala+++ b/src/Path.vala@@ -756,7 +756,7 @@ class Path { 		bool on_edge = false; 		double last_x = 0; 		-		if (points.length () == 0) {+		if (points.length () < 3) { 			return false; 		} 		@@ -830,7 +830,7 @@ class Path { 	 	public bool is_over_boundry_precision (double x, double y, double p) { 		if (unlikely (ymin == double.MAX)) {-			warning ("no bounding box");+			warning (@"no bounding box. length ($(points.length ()))"); 		} 		 		return (ymin - p <= y <= ymax + p) && (xmin - p <= x <= xmax + p);diff --git a/src/PenTool.vala b/src/PenTool.valaindex 88bc192..1dc5f3c 100644--- a/src/PenTool.vala+++ b/src/PenTool.vala@@ -602,7 +602,8 @@ class PenTool : Tool {  		g = MainWindow.get_current_glyph (); -		test_click_action (1, 130, 130); +		test_click_action (1, 130, 130); // open path+		test_click_action (1, 130, 130); // add point 		epa = g.get_last_edit_point (); 		 		test_click_action (1, 160, 130);@@ -757,7 +758,9 @@ class PenTool : Tool { 		MainWindow.get_overview ().open_current_glyph (); 		 		pen_tool.test_select_action ();-				+		+		pen_tool.test_click_action (1, 0, 0); // open path+		 		pen_tool.test_click_action (1, a.x, a.y); 		pen_tool.test_click_action (1, b.x, b.y); 		pen_tool.test_click_action (1, c.x, c.y);@@ -867,9 +870,11 @@ class PenTool : Tool { 		Tool delete_tool = MainWindow.get_toolbox ().get_tool ("erase_tool"); 		 		test_open_next_glyph ();+				+		pen = (PenTool) select_pen ();+		pen.test_click_action (1, 0, 0); // open path 		 		// draw a line with ten points-		pen = (PenTool) select_pen (); 		for (int i = 1; i <= 10; i++) { 			pen.test_click_action (1, 20*i, 20); 		}	

Contact

Email: johan.mattsson.m@gmail.com
Mastodon: typo.social/@birdfont
GitHub: johanmattssonm
LinkedIn: johan-mattsson-2ab324112