From: David H. <dav...@gm...> - 2008-09-23 16:12:18
|
Thanks Ben! Works perfectly now. Our fresh install now look beautiful :) On Tue, Sep 23, 2008 at 8:26 AM, Ben Faga <fag...@gm...> wrote: > Hello everyone, > > It has come to my attention that there is a bug when CMap displays > negative numbers on the map tick marks. This bug has existed in the > code since the 0.13 release (I don't know how it has slipped by this > long). > > Note: This bug only affects maps that have a negative start value. > > The bug causes negative numbers on the tick marks to be off by one (in > the last significant digit. For example: > > -30 -20 -10 0 10 > | | | | | > ---------------------------- > > Is being displayed as: > > -20 -10 0 0 10 > | | | | | > ---------------------------- > > I have attached a patch that will work with versions 0.15 to the current > release. > > To apply the patch, find the Bio/GMOD/CMap/Utils.pm file and patch it > like so: > > $ patch Bio/GMOD/CMap/Utils.pm Utils.080923.v1.01.patch > > This should fix the problem. > > > If you are using versions 0.13 or 0.14, then you will have to make the > patch by hand. Simply open the Bio/GMOD/CMap/Utils.pm file. Find the > "presentable_number" subroutine and replace the line: > > my $rounded_temp = int( ( $num / ( 10**$rounding_power ) ) + .5 ); > > with: > > my $half = ($num >= 0)? 0.5: -0.5; > my $rounded_temp = int( ( $num / ( 10**$rounding_power ) ) + $half ); > > I'm sorry for the inconvenience. My thanks goes to David Hane for > reporting this bug. > > Ben > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > gmod-cmap mailing list > gmo...@li... > https://lists.sourceforge.net/lists/listinfo/gmod-cmap > > |