The Birdfont Source Code


All Repositories / birdfont.git / commit – RSS feed

Toggle stroke button when object selection changes

These changes was commited to the Birdfont repository Sun, 19 Apr 2015 09:36:55 +0000.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
author Johan Mattsson <johan.mattsson.m@gmail.com>
Sun, 19 Apr 2015 09:36:55 +0000 (11:36 +0200)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Sun, 19 Apr 2015 09:36:55 +0000 (11:36 +0200)
commit 542242213be76179a4ed70d61de90b8f76bdffc1
tree 4f8dba55ed57e80b48c7202235eee223d69f3cd6
parent f9989cd064d1b23379baecdafebd14a3d01b4a9f
Toggle stroke button when object selection changes

libbirdfont/DrawingTools.vala
libbirdfont/MoveTool.vala
--- a/libbirdfont/DrawingTools.vala +++ b/libbirdfont/DrawingTools.vala @@ -765,6 +765,20 @@ 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"));
--- a/libbirdfont/MoveTool.vala +++ b/libbirdfont/MoveTool.vala @@ -145,6 +145,7 @@ moved = false; if (glyph.active_paths.size > 0) { + selection_changed (); objects_moved (); DrawingTools.resize_tool.signal_objects_rotated (); } else {