Chris Cannam wrote:

Are you talking about your new functions that include these lines?:

Yes.

return std::max(grid.snapX(item->rect().x()) - 1, 0L);
return std::max(grid.snapX(item->rect().x() + item->rect().width()) - 1, 0L);


If so, then presumably the off-by-1 error is caused by subtracting 1?

No, the -1 is here to correct the off-by-1 error. The problem is, I compute a rectangle size according to a segment's length (in computeSegmentRect() or something, I don't have the code at hand), and when I try to do the opposite operation (i.e. trying to find the segment's length from the rect's size), I don't get exact same result.


--
Guillaume
http://telegraph-road.org


------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Rosegarden-devel mailing list [email protected] - use the link below to unsubscribe https://lists.sourceforge.net/lists/listinfo/rosegarden-devel

Reply via email to