Commit 0bfb5e2
Select all glyphs in overview tab
Changed files (3)
modifiedlibbirdfont/BackgroundImage.valamodifiedlibbirdfont/Menu.valamodifiedlibbirdfont/OverView.vala
Diff
@@ -687,7 +687,6 @@ public class BackgroundImage { double trace_resolution = DrawingTools.auto_trace_resolution.get_value (); double threshold = DrawingTools.background_threshold.get_value ();- double simplification = DrawingTools.auto_trace_simplify.get_value (); thres = (threshold - 0.5) * 255; @@ -138,6 +138,13 @@ public class Menu : AbstractMenu { }); edit_menu.items.add (select_all_paths); + MenuItem select_all_glyphs = add_menu_item (t_("Select All Glyphs"), "select all glyphs", "Overview");+ select_all_glyphs.action.connect (() => {+ MainWindow.get_overview ().select_all_glyphs ();+ show_menu = false;+ });+ edit_menu.items.add (select_all_glyphs);+ MenuItem move_to_baseline = add_menu_item (t_("Move To Baseline"), "move to baseline", "Glyph"); move_to_baseline.action.connect (() => { MenuTab.move_to_baseline ();@@ -1,5 +1,5 @@ /*- Copyright (C) 2012 2014 Johan Mattsson+ Copyright (C) 2012 2014 2015 Johan Mattsson This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as @@ -125,6 +125,26 @@ public class OverView : FontDisplay { update_item_list (); } + public void select_all_glyphs () {+ Font f;+ GlyphCollection? glyphs;+ + f = BirdFont.get_current_font ();+ + for (int index = 0; index < f.length (); index++) {+ glyphs = f.get_glyph_collection_indice ((uint32) index);+ return_if_fail (glyphs != null);+ + selected_items.add ((!) glyphs);+ }+ + foreach (OverViewItem item in visible_items) {+ item.selected = item.glyphs != null;+ }+ + GlyphCanvas.redraw ();+ }+ public void use_default_character_set () { GlyphRange gr = new GlyphRange (); all_available = false;