The Birdfont Source Code


All Repositories / birdfont.git / commitdiff – RSS feed

Fix previous zoom view

These changes was commited to the Birdfont repository Sun, 31 May 2015 06:52:48 +0000.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
[Sun, 31 May 2015 06:52:48 +0000]

Updated Files

libbirdfont/Allocation.vala
libbirdfont/Glyph.vala
libbirdfont/ZoomBar.vala
libbirdfont/ZoomView.vala
--- a/libbirdfont/Allocation.vala +++ b/libbirdfont/Allocation.vala @@ -37,8 +37,12 @@ w.width = width; w.height = height; return w; + } + + public string to_string () { + return @"x: $x, y: $y, width: $width, height: $height\n"; } } }
--- a/libbirdfont/Glyph.vala +++ b/libbirdfont/Glyph.vala @@ -1388,14 +1388,14 @@ } public override void restore_last_view () { - if (zoom_list.size == 0 || zoom_list_index - 1 < 0 || zoom_list.size == 0) { + if (zoom_list.size == 0 || zoom_list_index - 1 < 0) { return; } zoom_list_index--; ZoomView z = zoom_list.get (zoom_list_index); - + view_offset_x = z.x; view_offset_y = z.y; view_zoom = z.zoom;
--- a/libbirdfont/ZoomBar.vala +++ b/libbirdfont/ZoomBar.vala @@ -45,7 +45,11 @@ }); panel_release_action.connect ((selected, button, tx, ty) => { + if (update_zoom) { + DrawingTools.zoom_tool.store_current_view (); + } update_zoom = false; + }); }
--- a/libbirdfont/ZoomView.vala +++ b/libbirdfont/ZoomView.vala @@ -25,8 +25,12 @@ this.y = y; this.zoom = zoom; this.allocation = allocation; + } + + public string to_string () { + return @"x: $(x), y: $y, zoom: $zoom\n" + allocation.to_string (); } } }