3D viewer: minor enhancement: display the name of the 3D shape being loaded.
This commit is contained in:
parent
8a70acb821
commit
4cc62ce038
|
@ -642,7 +642,7 @@ void C3D_RENDER_OGL_LEGACY::reload( REPORTER *aStatusTextReporter )
|
|||
if( aStatusTextReporter )
|
||||
aStatusTextReporter->Report( _( "Loading 3D models" ) );
|
||||
|
||||
load_3D_models();
|
||||
load_3D_models( aStatusTextReporter );
|
||||
|
||||
#ifdef PRINT_STATISTICS_3D_VIEWER
|
||||
unsigned stats_end_models_Load_Time = GetRunningMicroSecs();
|
||||
|
@ -923,7 +923,7 @@ void C3D_RENDER_OGL_LEGACY::generate_3D_Vias_and_Pads()
|
|||
* cache for this render. (cache based on C_OGL_3DMODEL with associated
|
||||
* openGL lists in GPU memory)
|
||||
*/
|
||||
void C3D_RENDER_OGL_LEGACY::load_3D_models()
|
||||
void C3D_RENDER_OGL_LEGACY::load_3D_models( REPORTER *aStatusTextReporter )
|
||||
{
|
||||
if( (!m_settings.GetFlag( FL_MODULE_ATTRIBUTES_NORMAL )) &&
|
||||
(!m_settings.GetFlag( FL_MODULE_ATTRIBUTES_NORMAL_INSERT )) &&
|
||||
|
@ -945,6 +945,16 @@ void C3D_RENDER_OGL_LEGACY::load_3D_models()
|
|||
{
|
||||
if( !sM->m_Filename.empty() )
|
||||
{
|
||||
if( aStatusTextReporter )
|
||||
{
|
||||
// Display the short filename of the 3D model loaded:
|
||||
// (the full name is usually too long to be displayed)
|
||||
wxFileName fn( sM->m_Filename );
|
||||
wxString msg;
|
||||
msg.Printf( _( "Loading %s" ), fn.GetFullName() );
|
||||
aStatusTextReporter->Report( msg );
|
||||
}
|
||||
|
||||
// Check if the model is not present in our cache map
|
||||
if( m_3dmodel_map.find( sM->m_Filename ) == m_3dmodel_map.end() )
|
||||
{
|
||||
|
|
|
@ -174,7 +174,7 @@ private:
|
|||
|
||||
void generate_3D_Vias_and_Pads();
|
||||
|
||||
void load_3D_models();
|
||||
void load_3D_models( REPORTER *aStatusTextReporter );
|
||||
|
||||
/**
|
||||
* @brief render_3D_models
|
||||
|
|
Loading…
Reference in New Issue