The Birdfont Source Code


All Repositories / birdfont.git / commitdiff – RSS feed

Clear glyph cache in overview

These changes was commited to the Birdfont repository Sun, 19 Jun 2016 13:23:32 +0000.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
[Sun, 19 Jun 2016 13:23:32 +0000]

Updated Files

libbirdfont/OverView.vala
libbirdfont/OverViewItem.vala
--- a/libbirdfont/OverView.vala +++ b/libbirdfont/OverView.vala @@ -421,8 +421,17 @@ OverViewItem.margin = OverViewItem.DEFAULT_MARGIN * z; update_item_list (); OverViewItem.reset_label (); - GlyphCanvas.redraw (); Preferences.set ("overview_zoom", @"$zoom"); + + Font font = BirdFont.get_current_font (); + for (int index = 0; index < font.length (); index++) { + GlyphCollection? glyphs = font.get_glyph_collection_index ((uint32) index); + return_if_fail (glyphs != null); + GlyphCollection g = (!) glyphs; + g.get_current ().overview_thumbnail = null; + } + + GlyphCanvas.redraw (); } public override void zoom_min () {
--- a/libbirdfont/OverViewItem.vala +++ b/libbirdfont/OverViewItem.vala @@ -102,7 +102,7 @@ g = ((!) glyphs).get_current (); - if (g.overview_thumbnail != null) { + if (likely (g.overview_thumbnail != null)) { cache = g.overview_thumbnail; return; } @@ -135,6 +135,8 @@ c.restore (); cache = s; + g.overview_thumbnail = s; + GlyphCanvas.redraw (); }