Commit 2e19bcb
Create path for new points when SVG objects are selected
Changed files (2)
Diff
@@ -308,6 +308,16 @@ public class Glyph : FontDisplay { } } + public bool has_active_path_objects () {+ foreach (SvgBird.Object object in active_paths) {+ if (object is PathObject) {+ return true;+ }+ }+ + return false;+ }+ public bool active_paths_contains (SvgBird.Object object) { Glyph glyph = MainWindow.get_current_glyph (); @@ -1836,7 +1836,9 @@ public class PenTool : Tool { Glyph g = MainWindow.get_current_glyph (); PathObject path; - if (g.active_paths.size == 0) {+ print ("Insert\n");+ + if (!g.has_active_path_objects ()) { np = new Path (); g.add_path (np); np.stroke = stroke ? StrokeTool.stroke_width : 0;@@ -1865,7 +1867,11 @@ public class PenTool : Tool { np.stroke = PenTool.path_stroke_width; } + path = new PathObject.for_path (np);+ g.add_active_object (null, path);+ PenTool.active_path = np;+ PenTool.selected_path = np; } g.clear_active_paths ();