Re: [Gimp-developer] PATCH - tiny bug in the rect tool
On Tue, 7 Feb 2006, Sven Neumann wrote: > Thanks for the patch, I have committed the change to CVS. In general > though, the preferred way to submit patches is by using our > bug-tracker. I know, but it was so small that I assumed it would be commited pretty soon anyway (and it was, thanks). If not I would have put it in bugzilla. By the way, in http://developer.gimp.org/HACKING it say Please submit patches to the gimp-developer@lists.xcf.berkeley.edu mailing list. It's also a good idea to file a bug-report at http://bugzilla.gnome.org/ and attach your patch to it. Maybe it should be changed to suggest bugzilla as the primary method? -- /Dennis Björklund ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] PATCH - tiny bug in the rect tool
Hi, Dennis Bjorklund <[EMAIL PROTECTED]> writes: > This is a patch for a tiny little bug in the the aspect calculation > of the rectangle tool (division by zero). Thanks for the patch, I have committed the change to CVS. In general though, the preferred way to submit patches is by using our bug-tracker. Sven ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
[Gimp-developer] PATCH - tiny bug in the rect tool
This is a patch for a tiny little bug in the the aspect calculation of the rectangle tool (division by zero). When I fixed the above I also noticed that the center point of the rectangle was calculated using integer division even though the center coordinates are gdoubles and thus can store the real center. So I changed the division by 2 into division by 2.0. ps. real as in both correct and non-integer! -- /Dennis Björklund Index: app/tools/gimprectangletool.c === RCS file: /cvs/gnome/gimp/app/tools/gimprectangletool.c,v retrieving revision 1.30 diff -u -r1.30 gimprectangletool.c --- app/tools/gimprectangletool.c 4 Feb 2006 05:37:20 - 1.30 +++ app/tools/gimprectangletool.c 6 Feb 2006 19:53:31 - @@ -2548,13 +2548,13 @@ width = x2 - x1; height = y2 - y1; - if (width > 0.01) + if (height > 0.01) aspect = width / height; else aspect = 0; - center_x = (x1 + x2) / 2; - center_y = (y1 + y2) / 2; + center_x = (x1 + x2) / 2.0; + center_y = (y1 + y2) / 2.0; g_signal_handlers_block_by_func (entry, rectangle_dimensions_changed, ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer