Correct locked shapes' rotation after corner drag
When using the new (on 0.9.25) corner-drag option for creating a new shape, "shape-locked" (1:1 aspect ratio) shapes -- square and octagon -- would only rotate in a few positions, based on the angle of ther vertices. Corrected this, with no apparent adverse effect on other shapes, in either drag mode (classic "from-center", and new "from-corner"). Also, removed extranous whitespace before EOLs in src/tuxpaint.c.
This commit is contained in:
parent
aae22f0593
commit
5a1a80ff69
1 changed files with 43 additions and 38 deletions
|
|
@ -22,7 +22,7 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
(See COPYING.txt)
|
||||
|
||||
June 14, 2002 - October 15, 2020
|
||||
June 14, 2002 - November 10, 2020
|
||||
*/
|
||||
|
||||
|
||||
|
|
@ -13271,6 +13271,10 @@ static int shape_rotation(int ctr_x, int ctr_y, int ox, int oy)
|
|||
else if (shape_radius < 100)
|
||||
deg = ((deg - 7) / 15) * 15;
|
||||
|
||||
/* Disabled b/c it adversely affected shape_locked shapes (square & octagon)
|
||||
with corner-dragged shapes; disabling doesn't seem to cause problems
|
||||
with any shape, in either drag mode... -bjk 2020-11-10 */
|
||||
/*
|
||||
if (shape_locked[cur_shape])
|
||||
{
|
||||
int angle_skip;
|
||||
|
|
@ -13278,6 +13282,7 @@ static int shape_rotation(int ctr_x, int ctr_y, int ox, int oy)
|
|||
angle_skip = 360 / shape_sides[cur_shape];
|
||||
deg = deg % angle_skip;
|
||||
}
|
||||
*/
|
||||
|
||||
return (deg);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue