The Birdfont Source Code
Fix glyph export
These changes was commited to the Birdfont repository Sun, 19 Jun 2016 21:25:02 +0000.
Contributing
Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
Fix glyph export
--- a/libbirdfont/ExportTool.vala
+++ b/libbirdfont/ExportTool.vala
@@ -159,14 +159,14 @@
string fn;
int i;
- if (fd is Glyph) {
+ if (fd is GlyphTab || fd is Glyph) {
glyph = MainWindow.get_current_glyph ();
} else if (fd is OverView) {
OverView overview = MainWindow.get_overview ();
Glyph? g = overview.get_selected_glyph ();
if (g == null) {
- warning("No glyhp selected in overview.");
+ warning("No glyph selected in overview.");
return;
}
@@ -178,6 +178,7 @@
name = glyph.get_name ();
if (selected_file == null) {
+ warning ("No selected file.");
return;
}
@@ -198,7 +199,6 @@
glyph_svg = export_to_string (glyph, false);
os = new DataOutputStream (file.create(FileCreateFlags.REPLACE_DESTINATION));
os.put_string (glyph_svg);
-
} catch (Error e) {
stderr.printf (@"Export \"$svg_file\" \n");
critical (@"$(e.message)");