The Birdfont Source Code


All Repositories / birdfont.git / commit – RSS feed

Create new paths in pen tool

These changes was commited to the Birdfont repository Fri, 01 May 2015 11:37:29 +0000.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
author Johan Mattsson <johan.mattsson.m@gmail.com>
Fri, 01 May 2015 11:37:29 +0000 (13:37 +0200)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Fri, 01 May 2015 11:37:29 +0000 (13:37 +0200)
commit ca7f837a4bae46fcd9b4dc32932d270f187dfc57
tree a67acffc29efdd2b9575ca3f6d0d6373e91f1c08
parent 7c545fd6970864dfb27c763a5670c3d2cd5fb045
Create new paths in pen tool

README.md
libbirdfont/Glyph.vala
libbirdfont/PenTool.vala
--- a/README.md +++ b/README.md @@ -17,12 +17,19 @@ packages with a -dev or -devel affix: valac + libgee-dev + libglib2.0-dev + libgtk-3-dev + python-gtk2-dev + libwebkitgtk-3.0-dev + libnotify-dev + unicode-data (unicode character database) BirdFont have two build systems, one python script that builds all @@ -30,20 +37,27 @@ doit. Configure, build and install with python: + ./configure + ./scripts/linux_build.py + sudo ./install.py Configure, build and install with doit: ./configure + doit + sudo ./install.py The default prefix is /usr/local on Fedora should BirdFont be compiled with /usr as prefix. ./configure --prefix=/usr + ./scripts/linux_build.py --prefix=/usr + sudo ./install.py ## Packages
--- a/libbirdfont/Glyph.vala +++ b/libbirdfont/Glyph.vala @@ -1546,7 +1546,8 @@ if (!(MainWindow.get_toolbox ().get_current_tool () is PenTool) && !(MainWindow.get_toolbox ().get_current_tool () is PointTool) - && !(MainWindow.get_toolbox ().get_current_tool () is TrackTool)) { + && !(MainWindow.get_toolbox ().get_current_tool () is TrackTool) + && !(MainWindow.get_toolbox ().get_current_tool () is ForesightTool)) { cr.save (); cr.new_path (); foreach (Path p in active_paths) {
--- a/libbirdfont/PenTool.vala +++ b/libbirdfont/PenTool.vala @@ -94,8 +94,13 @@ counter_clockwise = new Gee.ArrayList<Path> (); select_action.connect ((self) => { + MainWindow.get_current_glyph ().clear_active_paths (); }); + deselect_action.connect ((self) => { + MainWindow.get_current_glyph ().clear_active_paths (); + }); + press_action.connect ((self, b, x, y) => { // retain path direction clockwise = new Gee.ArrayList<Path> (); @@ -809,6 +814,9 @@ } else { glyph.open_path (); } + + glyph.clear_active_paths (); + return; } @@ -1523,6 +1531,10 @@ return_if_fail (glyph.active_paths.size > 0); add_selected_point (selected_point, glyph.active_paths.get (glyph.active_paths.size - 1)); + active_path = new_point.path; + glyph.clear_active_paths (); + glyph.add_active_path (new_point.path); + move_selected = true; return new_point;