Clone in a terminal:
Commit 5422422
Johan Mattsson - 2015-04-19T09:36:55+00:00
542242213be76179a4ed70d61de90b8f76bdffc1johan.mattsson.m@gmail.com

Toggle stroke button when object selection changes

Changed files (2)

Diff

diff --git a/libbirdfont/DrawingTools.vala b/libbirdfont/DrawingTools.valaindex 9a186a5..c3a9cdc 100644--- a/libbirdfont/DrawingTools.vala+++ b/libbirdfont/DrawingTools.vala@@ -765,6 +765,20 @@ public class DrawingTools : ToolCollection  { 			StrokeTool.stroke_width = object_stroke.get_value (); 		}); 		stroke_expander.add_tool (object_stroke);+		+		move_tool.selection_changed.connect (() => {+			bool stroke = false;+			Glyph g = MainWindow.get_current_glyph ();+			+			foreach (Path p in g.active_paths) {+				if (p.stroke > 0) {+					stroke = true;+				}+			}+			+			add_stroke.selected = stroke;+			Toolbox.redraw_tool_box ();+		});  		// create outline from path 		Tool outline = new Tool ("stroke_to_outline", t_("Create outline form stroke"));diff --git a/libbirdfont/MoveTool.vala b/libbirdfont/MoveTool.valaindex e953cf3..2fd8a32 100644--- a/libbirdfont/MoveTool.vala+++ b/libbirdfont/MoveTool.vala@@ -145,6 +145,7 @@ public class MoveTool : Tool { 		moved = false; 		 		if (glyph.active_paths.size > 0) {+			selection_changed (); 			objects_moved (); 			DrawingTools.resize_tool.signal_objects_rotated (); 		} else {

Contact

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