Updated Files
libbirdfont/GlyphSelection.vala |
libbirdfont/OverviewTools.vala |
--- a/libbirdfont/GlyphSelection.vala
+++ b/libbirdfont/GlyphSelection.vala
@@ -20,7 +20,17 @@
public GlyphSelection () {
base (null, false);
- display_all_available_glyphs ();
+
+ if (BirdFont.get_current_font ().length () > 0) {
+ display_all_available_glyphs ();
+ } else {
+ GlyphRange gr = new GlyphRange ();
+ DefaultCharacterSet.use_default_range (gr);
+ set_glyph_range (gr);
+ }
+
+ OverviewTools.update_overview_characterset (this);
+ FontDisplay.dirty_scrollbar = true;
open_glyph_signal.connect ((gc) => {
selected_glyph (gc);
--- a/libbirdfont/OverviewTools.vala
+++ b/libbirdfont/OverviewTools.vala
@@ -101,11 +101,11 @@
all_glyphs.select_action (all_glyphs);
}
- public static void update_overview_characterset () {
+ public static void update_overview_characterset (OverView? tab = null) {
GlyphRange gr;
uint size;
OverView overview;
-
+
// All characters
size = BirdFont.get_current_font ().length ();
all_glyphs.number = get_display_value (size);
@@ -122,7 +122,7 @@
size = gr.get_length ();
unicode.number = get_display_value (size);
- overview = MainWindow.get_overview ();
+ overview = (tab == null) ? MainWindow.get_overview () : (!) tab;
// set selected item
all_glyphs.set_selected (false);