Commit 7784365b authored by Maciej Suminski's avatar Maciej Suminski

Fixed bounding box for module texts.

parent 537d82fb
......@@ -415,6 +415,18 @@ EDA_ITEM* TEXTE_MODULE::Clone() const
}
const BOX2I TEXTE_MODULE::ViewBBox() const
{
double angle = GetDrawRotation();
EDA_RECT text_area = GetTextBox( -1, -1 );
if( angle )
text_area = text_area.GetBoundingBoxRotated( m_Pos, angle );
return BOX2I( text_area.GetPosition(), text_area.GetSize() );
}
void TEXTE_MODULE::ViewGetLayers( int aLayers[], int& aCount ) const
{
switch( m_Type )
......
......@@ -165,6 +165,9 @@ public:
EDA_ITEM* Clone() const;
/// @copydoc VIEW_ITEM::ViewBBox()
virtual const BOX2I ViewBBox() const;
/// @copydoc VIEW_ITEM::ViewGetLayers()
virtual void ViewGetLayers( int aLayers[], int& aCount ) const;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment