The Birdfont Source Code


All Repositories / birdfont.git / commit – RSS feed

Update labels in background tab

These changes was commited to the Birdfont repository Fri, 02 Oct 2015 12:49:56 +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>
Fri, 02 Oct 2015 12:49:56 +0000 (14:49 +0200)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Fri, 02 Oct 2015 12:50:25 +0000 (14:50 +0200)
commit 8a0af95871e76b011364728a92a7d0b7222f6c87
tree 0289e29c67c90bd4674c4dc6cc8ed048087ea6de
parent 555a687bb063bf073b997f55d685a67636b31855
Update labels in background tab

libbirdfont/BackgroundTools.vala
libbirdfont/Expander.vala
libbirdfont/LabelTool.vala
--- a/libbirdfont/BackgroundTools.vala +++ b/libbirdfont/BackgroundTools.vala @@ -134,6 +134,7 @@ parts.tool.remove (bpl); bpl.selection.parent_image.selections.remove (bpl.selection); MainWindow.get_toolbox ().update_expanders (); + parts.clear_cache (); set_default_canvas (); Toolbox.redraw_tool_box (); GlyphCanvas.redraw (); @@ -168,6 +169,7 @@ set_default_canvas (); ZoomTool.zoom_full_background_image (); + MainWindow.get_toolbox ().update_expanders (); } public override Gee.ArrayList<Expander> get_expanders () {
--- a/libbirdfont/Expander.vala +++ b/libbirdfont/Expander.vala @@ -57,6 +57,10 @@ } tool = new Gee.ArrayList<Tool> (); + } + + public void clear_cache () { + cached = null; } public void set_headline (string? h) {
--- a/libbirdfont/LabelTool.vala +++ b/libbirdfont/LabelTool.vala @@ -18,7 +18,16 @@ public class LabelTool : Tool { - public string label { get; set; } + public string label { + get { + return label_text.text; + } + + set { + label_text.set_text (value); + } + } + public string number { get; set; } public bool has_counter { get; set; } public bool has_delete_button { get; set; }