Set ViewBBox to viewitem size
Limit the bbox size of origin view item to item size. This prevents excessive redraw. This also side-steps a degeneracy in the RTree calculation under certain conditions in i386 where multiple, maximum-sized items are degenerate. Fixes: lp:1774316 * https://bugs.launchpad.net/kicad/+bug/1774316
This commit is contained in:
parent
9e4511eb11
commit
7d62f14dd0
|
@ -53,7 +53,14 @@ ORIGIN_VIEWITEM* ORIGIN_VIEWITEM::Clone() const
|
|||
const BOX2I ORIGIN_VIEWITEM::ViewBBox() const
|
||||
{
|
||||
BOX2I bbox;
|
||||
bbox.SetMaximum();
|
||||
|
||||
if( m_drawAtZero )
|
||||
bbox.SetOrigin( VECTOR2I( -m_size / 2, -m_size / 2 ) );
|
||||
else
|
||||
bbox.SetOrigin( VECTOR2I( m_position.x, m_position.y ) - VECTOR2I( m_size / 2, m_size / 2 ) );
|
||||
|
||||
bbox.SetSize( VECTOR2I( m_size, m_size ) );
|
||||
|
||||
return bbox;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue