Commit 65e6ba8
ignore grid when objects are selected
Changed files (3)
modifiedlibbirdfont/BirdFont.valamodifiedlibbirdfont/DefaultCharactersSet.valamodifiedlibbirdfont/MoveTool.vala
Diff
@@ -270,7 +270,7 @@ public class BirdFont { Preferences.set_last_file (get_current_font ().get_path ()); DefaultCharacterSet.create_default_character_sets ();- DefaultCharacterSet.get_glyphs_for_prefered_language ();+ DefaultCharacterSet.get_characters_for_prefered_language (); } @@ -34,7 +34,7 @@ public class DefaultCharacterSet { } /** Add a new language to the menu for default character set.- * @param language A localized string of the language.+ * @param language A localized string for the name of the language. * @param language_code ISO code * @param characters all characters (including characters with diacritical marks). * For languages with too many glyphs should this string be left empty. @@ -78,7 +78,7 @@ public class DefaultCharacterSet { return languages[0]; } - public static string get_glyphs_for_prefered_language () {+ public static string get_characters_for_prefered_language () { string lang = get_prefered_language_code (); int i = 0; string characters = "";@@ -101,7 +101,7 @@ public class DefaultCharacterSet { string lower_case, upper_case; string all_characters; - all_characters = get_glyphs_for_prefered_language ();+ all_characters = get_characters_for_prefered_language (); if (all_characters != "") { foreach (string c in all_characters.split (" ")) { gr.add_single (c.get_char ());@@ -272,7 +272,7 @@ public class DefaultCharacterSet { } public class DefaultLanguages {- public static List<string> names;+ public static List<string> names; public static List<string> codes; public static List<string> characters; @@ -20,6 +20,7 @@ namespace BirdFont { class MoveTool : Tool { bool move_path = false;+ bool moved = false; double last_x = 0; double last_y = 0; @@ -104,11 +105,13 @@ class MoveTool : Tool { resize_path = false; rotate_path = false; - if (GridTool.is_visible ()) {+ if (GridTool.is_visible () && moved) { foreach (Path p in glyph.active_paths) { tie_path_to_grid (p, x, y); } }+ + moved = false; }); move_action.connect ((self, x, y) => {@@ -117,7 +120,8 @@ class MoveTool : Tool { double dy = last_y - y; double p = PenTool.precision; - if (move_path) {+ if (move_path && (fabs(dx) > 0 || fabs (dy) > 0)) {+ moved = true; foreach (Path path in glyph.active_paths) { path.move (Glyph.ivz () * -dx * p, Glyph.ivz () * dy * p); }