The Birdfont Source Code


All Repositories / birdfont.git / commitdiff – RSS feed

Toggle between right and left handle in Beziér tool

These changes was commited to the Birdfont repository Thu, 16 Oct 2014 13:17:01 +0000.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
[Thu, 16 Oct 2014 13:17:01 +0000]

Updated Files

libbirdfont/ForesightTool.vala
--- a/libbirdfont/ForesightTool.vala +++ b/libbirdfont/ForesightTool.vala @@ -28,6 +28,9 @@ uint state = NONE; bool move_right_handle = true; + + int last_x = 0; + int last_y = 0; public ForesightTool (string name) { base (name, t_ ("Create Beziér curves"), '.', CTRL); @@ -165,6 +168,8 @@ } } + last_x = x; + last_y = y; }); key_press_action.connect ((self, keyval) => { @@ -173,12 +178,11 @@ switch (keyval) { case 's': switch_to_line_mode (); - break; - case 'l': - move_right_handle = true; break; case 'r': - move_right_handle = false; + move_right_handle = !move_right_handle; + state = MOVE_HANDLES; + move_action (self, last_x, last_y); break; }