Commit a455ab4a authored by jean-pierre charras's avatar jean-pierre charras

Fix bugs 1264236, 1264238, 1264254

parent 46e82e4e
......@@ -636,7 +636,7 @@ void EDA_DRAW_FRAME::ClearMsgPanel( void )
void EDA_DRAW_FRAME::SetMsgPanel( const MSG_PANEL_ITEMS& aList )
{
if( m_messagePanel == NULL && !aList.empty() )
if( m_messagePanel == NULL )
return;
ClearMsgPanel();
......
......@@ -71,6 +71,7 @@ double AM_PARAM::GetValue( const D_CODE* aDcode ) const
double paramvalue = 0.0;
double curr_value = 0.0;
parm_item_type state = POPVALUE;
for( unsigned ii = 0; ii < m_paramStack.size(); ii++ )
{
AM_PARAM_ITEM item = m_paramStack[ii];
......@@ -85,12 +86,19 @@ double AM_PARAM::GetValue( const D_CODE* aDcode ) const
case PUSHPARM:
// get the parameter from the aDcode
if( aDcode && item.GetIndex() <= aDcode->GetParamCount() )
curr_value = aDcode->GetParam( item.GetIndex() );
else // Get parameter from local param definition
if( aDcode ) // should be always true here
{
if( item.GetIndex() <= aDcode->GetParamCount() )
curr_value = aDcode->GetParam( item.GetIndex() );
else // Get parameter from local param definition
{
const APERTURE_MACRO * am_parent = aDcode->GetMacro();
curr_value = am_parent->GetLocalParam( aDcode, item.GetIndex() );
}
}
else
{
const APERTURE_MACRO * am_parent = aDcode->GetMacro();
curr_value = am_parent->GetLocalParam( aDcode, item.GetIndex() );
wxLogDebug( wxT( "AM_PARAM::GetValue(): NULL param aDcode\n" ) );
}
// Fall through
case PUSHVALUE: // a value is on the stack:
......
......@@ -1154,12 +1154,18 @@ void TRACK::GetMsgPanelInfoBase( std::vector< MSG_PANEL_ITEM >& aList )
LAYER_NUM top_layer, bottom_layer;
Via->ReturnLayerPair( &top_layer, &bottom_layer );
msg = board->GetLayerName( top_layer ) + wxT( "/" )
+ board->GetLayerName( bottom_layer );
if( board )
msg = board->GetLayerName( top_layer ) + wxT( "/" )
+ board->GetLayerName( bottom_layer );
else
msg.Printf(wxT("%d/%d"), top_layer, bottom_layer );
}
else
{
msg = board->GetLayerName( m_Layer );
if( board )
msg = board->GetLayerName( m_Layer );
else
msg.Printf(wxT("%d"), m_Layer );
}
aList.push_back( MSG_PANEL_ITEM( _( "Layer" ), msg, BROWN ) );
......
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