Very minor fix: a pcbnew option (show page limits) was not stored in user config, and was lost after closing the session.

3d-viewer: very minor fix
This commit is contained in:
jean-pierre charras 2015-11-29 07:56:27 +01:00
parent c1b46e6ed8
commit 407aa9c586
3 changed files with 8 additions and 5 deletions

View File

@ -119,8 +119,7 @@ EDA_3D_CANVAS::~EDA_3D_CANVAS()
// Free the list of parsers list
for( unsigned int i = 0; i < m_model_parsers_list.size(); i++ )
if( m_model_parsers_list[i] )
delete m_model_parsers_list[i];
delete m_model_parsers_list[i];
}

View File

@ -447,7 +447,7 @@ void EDA_3D_CANVAS::Redraw()
// Board Body
GLint shininess_value = 32;
glMateriali ( GL_FRONT_AND_BACK, GL_SHININESS, shininess_value );
glMateriali( GL_FRONT_AND_BACK, GL_SHININESS, shininess_value );
if( isEnabled( FL_SHOW_BOARD_BODY ) )
{
@ -460,8 +460,9 @@ void EDA_3D_CANVAS::Redraw()
// Board
// specify material parameters for the lighting model.
shininess_value = 52;
glMateriali ( GL_FRONT_AND_BACK, GL_SHININESS, shininess_value );
glMateriali( GL_FRONT_AND_BACK, GL_SHININESS, shininess_value );
glm::vec4 specular( GetPrm3DVisu().m_CopperColor.m_Red * 0.20f,
GetPrm3DVisu().m_CopperColor.m_Green * 0.20f,
@ -477,7 +478,7 @@ void EDA_3D_CANVAS::Redraw()
// Tech layers
shininess_value = 32;
glMateriali ( GL_FRONT_AND_BACK, GL_SHININESS, shininess_value );
glMateriali( GL_FRONT_AND_BACK, GL_SHININESS, shininess_value );
glm::vec4 specularTech( 0.0f, 0.0f, 0.0f, 1.0f );
glMaterialfv( GL_FRONT_AND_BACK, GL_SPECULAR, &specularTech.x );

View File

@ -86,6 +86,7 @@
#define PCB_MAGNETIC_TRACKS_OPT wxT( "PcbMagTrackOpt" )
#define SHOW_MICROWAVE_TOOLS wxT( "ShowMicrowaveTools" )
#define SHOW_LAYER_MANAGER_TOOLS wxT( "ShowLayerManagerTools" )
#define SHOW_PAGE_LIMITS_KEY wxT( "ShowPageLimits" )
BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME )
@ -743,6 +744,7 @@ void PCB_EDIT_FRAME::LoadSettings( wxConfigBase* aCfg )
aCfg->Read( PCB_MAGNETIC_TRACKS_OPT, &g_MagneticTrackOption );
aCfg->Read( SHOW_MICROWAVE_TOOLS, &m_show_microwave_tools );
aCfg->Read( SHOW_LAYER_MANAGER_TOOLS, &m_show_layer_manager_tools );
aCfg->Read( SHOW_PAGE_LIMITS_KEY, &m_showPageLimits );
}
@ -758,6 +760,7 @@ void PCB_EDIT_FRAME::SaveSettings( wxConfigBase* aCfg )
aCfg->Write( PCB_MAGNETIC_TRACKS_OPT, (long) g_MagneticTrackOption );
aCfg->Write( SHOW_MICROWAVE_TOOLS, (long) m_show_microwave_tools );
aCfg->Write( SHOW_LAYER_MANAGER_TOOLS, (long)m_show_layer_manager_tools );
aCfg->Write( SHOW_PAGE_LIMITS_KEY, m_showPageLimits );
}