Commit 73d236d
Update labels when new parts are created from background images
Changed files (3)
modifiedlibbirdfont/BackgroundTools.valamodifiedlibbirdfont/ClipTool.valamodifiedlibbirdfont/VersionList.vala
Diff
@@ -181,13 +181,14 @@ public class BackgroundTools : ToolCollection { }); label.has_delete_button = true; parts.add_tool (label, 0);+ parts.redraw (); if (!is_null (MainWindow.get_toolbox ())) {- MainWindow.get_toolbox ().update_expanders ();- Toolbox.redraw_tool_box ();+ MainWindow.get_toolbox ().update_expanders ();+ parts.clear_cache ();+ Toolbox.redraw_tool_box ();+ GlyphCanvas.redraw (); }- - parts.redraw (); } void set_new_background_image (GlyphCollection gc, BackgroundPartLabel bpl) {@@ -134,7 +134,8 @@ public class ClipTool : Tool { string data; return_if_fail (fd is GlyphTab); - destination = (Glyph) fd;+ GlyphTab glyph_tab = (GlyphTab) fd; + destination = glyph_tab.glyphs.get_current (); ((!)destination).store_undo_state (); ((!)destination).clear_active_paths (); @@ -238,7 +238,8 @@ public class VersionList : GLib.Object { continue; } - glyph = (Glyph) tab.get_display ();+ GlyphTab glyph_tab = (GlyphTab) tab.get_display ();+ glyph = glyph_tab.glyphs.get_current (); uni.truncate (0); uni.append_unichar (glyph.unichar_code); ug = font.get_glyph (uni.str);