The Birdfont Source Code


All Repositories / birdfont.git / commit – RSS feed

Remove objects in sublayers

These changes was commited to the Birdfont repository Mon, 20 Jun 2016 07:33:02 +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>
Mon, 20 Jun 2016 07:33:02 +0000 (09:33 +0200)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Mon, 20 Jun 2016 07:33:36 +0000 (09:33 +0200)
commit f84b72f61bce35f741514a6f118baec6555ed4c2
tree 7507587c18a25f16689198136b9e9b96312779ab
parent 71459fb06ee1f7cb527bbd4c1aadc7903cd2a96e
Remove objects in sublayers

libbirdfont/MoveTool.vala
libsvgbird/Layer.vala
--- a/libbirdfont/MoveTool.vala +++ b/libbirdfont/MoveTool.vala @@ -96,12 +96,7 @@ } foreach (SvgBird.Object p in g.active_paths) { - if (p is PathObject) { - LayerUtils.remove_path (g.layers, ((PathObject) p).get_path ()); - } else { - g.layers.remove (p); - } - + g.layers.remove (p); g.update_view (); }
--- a/libsvgbird/Layer.vala +++ b/libsvgbird/Layer.vala @@ -115,6 +115,14 @@ public void remove (Object o) { objects.remove (o); + + foreach (Object object in objects) { + if (object is Layer) { + Layer sublayer = (Layer) object; + sublayer.remove (o);; + } + } + update_boundaries (Matrix.identity ()); }