Fixes in 3D viewer
Fixes #12769 https://gitlab.com/kicad/code/kicad/issues/12769 Fixes #12765 https://gitlab.com/kicad/code/kicad/issues/12765
This commit is contained in:
parent
f31feaac42
commit
e5182dd749
|
@ -470,7 +470,7 @@ void EDA_3D_VIEWER_FRAME::applyViewport( const wxString& aViewportName )
|
||||||
{
|
{
|
||||||
int idx = m_cbViewports->FindString( aViewportName );
|
int idx = m_cbViewports->FindString( aViewportName );
|
||||||
|
|
||||||
if( idx >= 0 && m_cbViewports->GetSelection() != idx )
|
if( idx >= 0 )
|
||||||
{
|
{
|
||||||
m_cbViewports->SetSelection( idx );
|
m_cbViewports->SetSelection( idx );
|
||||||
m_lastSelectedViewport = static_cast<VIEWPORT3D*>( m_cbViewports->GetClientData( idx ) );
|
m_lastSelectedViewport = static_cast<VIEWPORT3D*>( m_cbViewports->GetClientData( idx ) );
|
||||||
|
@ -538,6 +538,7 @@ void EDA_3D_VIEWER_FRAME::onViewportChanged( wxCommandEvent& aEvent )
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
index = m_cbViewports->FindString( name );
|
index = m_cbViewports->FindString( name );
|
||||||
|
m_viewports[name].matrix = m_currentCamera.GetViewMatrix();
|
||||||
m_viewportMRU.Remove( name );
|
m_viewportMRU.Remove( name );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -125,6 +125,10 @@ protected:
|
||||||
|
|
||||||
void handleIconizeEvent( wxIconizeEvent& aEvent ) override;
|
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 );
|
void applyViewport( const wxString& aViewportName );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Reference in New Issue