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