Commit 6ba14100 authored by Maciej Suminski's avatar Maciej Suminski

Fixed vanishing pads issue in the pad properties dialog (GAL).

parent f51ad438
......@@ -796,13 +796,16 @@ void DIALOG_PAD_PROPERTIES::redraw()
BOX2I bbox = m_dummyPad->ViewBBox();
// Autozoom
m_panelShowPadGal->GetView()->SetViewport( BOX2D( bbox.GetOrigin(), bbox.GetSize() ) );
if( bbox.GetSize().x > 0 && bbox.GetSize().y > 0 )
{
// Autozoom
m_panelShowPadGal->GetView()->SetViewport( BOX2D( bbox.GetOrigin(), bbox.GetSize() ) );
// Add a margin
m_panelShowPadGal->GetView()->SetScale( m_panelShowPadGal->GetView()->GetScale() * 0.7 );
// Add a margin
m_panelShowPadGal->GetView()->SetScale( m_panelShowPadGal->GetView()->GetScale() * 0.7 );
m_panelShowPadGal->Refresh();
m_panelShowPadGal->Refresh();
}
}
else
{
......
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