Fixed a crash when editing a pad of a bottom layer module

Fixes: lp:1720007
* https://bugs.launchpad.net/kicad/+bug/1720007
This commit is contained in:
Maciej Suminski 2017-09-28 09:57:46 +02:00
parent 54d34c341b
commit 6006b54dd9
2 changed files with 4 additions and 14 deletions

View File

@ -897,19 +897,9 @@ void VIEW::draw( VIEW_ITEM* aItem, int aLayer, bool aImmediate )
int group = viewData->getGroup( aLayer );
if( group >= 0 )
{
m_gal->DrawGroup( group );
}
else
{
group = m_gal->BeginGroup();
viewData->setGroup( aLayer, group );
if( !m_painter->Draw( aItem, aLayer ) )
aItem->ViewDraw( aLayer, this ); // Alternative drawing method
m_gal->EndGroup();
}
Update( aItem );
}
else
{

View File

@ -126,9 +126,6 @@ DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES( PCB_BASE_FRAME* aParent, D_PAD* aP
else // We are editing a "master" pad, i.e. a template to create new pads
*m_dummyPad = *m_padMaster;
// Initialize canvas to be able to display the dummy pad:
prepareCanvas();
initValues();
// Usually, TransferDataToWindow is called by OnInitDialog
@ -136,6 +133,9 @@ DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES( PCB_BASE_FRAME* aParent, D_PAD* aP
// safely fix minsizes
TransferDataToWindow();
// Initialize canvas to be able to display the dummy pad:
prepareCanvas();
m_sdbSizerOK->SetDefault();
m_canUpdate = true;