[Scilab-Dev] bug in the xgetmouse function

Sylvestre Ledru sylvestre.ledru at scilab-enterprises.com
Fri Apr 27 16:27:05 CEST 2012


Hello Marcos,

On 27/04/2012 16:22, Marcos Cardinot wrote:
> Hi,
>
> I was studying in a datatip codes and found a bug that happened when
> the user wants to drag a datatip. Initially, I thought there was some
> problem with the file datatipMove.sci.
>
> After performing some tests, I found that the error is in the
> xgetmouse function, which is not providing coordinate data correctly
> (always returns 0 and 0).
>
> After running git blame on sci_xgetmouse.c, I discovered that the bug
> was introduced during commit" 582dead8368ac857e5b3ddd1c64360
> 716da76887
>
> I checked a few lines that were commented out and that the
> "pixelCoords" was not being passed to the scilab stack.
>
> After these changes the function xgetmouse is working well and datatip
> bug no longer exists. Now you can drag datatip normally.
>
> I do not know if the rows removed lines in my patch have to do with
> coordinates in sub-plots, but according to my tests everything seems
> to be working fine.
>
> Should I open a bug, even though I am already submitting a patch?
>
Did you check if this bug has not been reported before ?
For now, I pushed it in the code review:
http://codereview.scilab.org/#/c/7067/
> Also, do you think I should leave the commented-out lines?
> I am not sure if they can be useful in the future.
It depends but usually, it prefer to remove comments, the information
remains available in the git history.

Well done!

Sylvestre
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/dev/attachments/20120427/9ca167b0/attachment.htm>


More information about the dev mailing list