Commit 1873e058 authored by dickelbeck's avatar dickelbeck

BOARD_ITEM::GetBoard(), one size fits all. Maybe this can become non-virtual once tested.

parent d21ced62
......@@ -318,8 +318,14 @@ void BOARD_ITEM::UnLink()
BOARD* BOARD_ITEM::GetBoard() const
{
// overload this function as needed.
if( Type() == TYPE_PCB )
return (BOARD*) this;
return (BOARD*) GetParent();
BOARD_ITEM* parent = GetParent();
if( parent )
return parent->GetBoard();
return NULL;
}
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