The Birdfont Source Code


All Repositories / birdfont.git / blobdiff – RSS feed

Select first character when overview tab is created

Changes made to libbirdfont/OverView.vala

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
--- libbirdfont/OverView.vala +++ libbirdfont/OverView.vala @@ -81,6 +81,15 @@ create_new_glyph (character); }); } + + IdleSource idle = new IdleSource (); + + idle.set_callback (() => { + selected_canvas (); + return false; + }); + + idle.attach (null); update_scrollbar (); reset_zoom (); @@ -239,6 +248,7 @@ update_scrollbar (); update_zoom_bar (); OverViewItem.glyph_scale = 1; + selected_item = get_selected_item (); GlyphCanvas.redraw (); } @@ -319,10 +329,7 @@ first_visible = 0; selected = 0; - if (selected > visible_items.size) { - selected_item = get_selected_item (); - } - + selected_item = get_selected_item (); GlyphCanvas.redraw (); } @@ -1039,6 +1046,8 @@ scroll_top (); // TODO: scroll down to c + update_item_list (); + selected_item = get_selected_item (); GlyphCanvas.redraw (); }