jean-pierre charras 2022-10-27 11:34:11 +02:00
parent f31feaac42
commit e5182dd749
2 changed files with 6 additions and 1 deletions

View File

@ -470,7 +470,7 @@ void EDA_3D_VIEWER_FRAME::applyViewport( const wxString& aViewportName )
{
int idx = m_cbViewports->FindString( aViewportName );
if( idx >= 0 && m_cbViewports->GetSelection() != idx )
if( idx >= 0 )
{
m_cbViewports->SetSelection( idx );
m_lastSelectedViewport = static_cast<VIEWPORT3D*>( m_cbViewports->GetClientData( idx ) );
@ -538,6 +538,7 @@ void EDA_3D_VIEWER_FRAME::onViewportChanged( wxCommandEvent& aEvent )
else
{
index = m_cbViewports->FindString( name );
m_viewports[name].matrix = m_currentCamera.GetViewMatrix();
m_viewportMRU.Remove( name );
}

View File

@ -125,6 +125,10 @@ protected:
void handleIconizeEvent( wxIconizeEvent& aEvent ) override;
/**
* switch to a given predefined 3D viewport
* @param aViewportName is the name of the viewport to switch on
*/
void applyViewport( const wxString& aViewportName );
private: