Pcbnew: Do not immediately refresh the 3D view after each board edition.

Previously, when the 3D viewer is opened, each board edition creates a 3D view refresh, that usually takes a bit of time.
Now the refresh is postponed until the 3D viewer has the focus.
This commit is contained in:
jean-pierre charras 2019-01-23 17:47:17 +01:00
parent efe880bb79
commit 86263d6bb3
1 changed files with 8 additions and 1 deletions

View File

@ -162,7 +162,14 @@ bool PCB_BASE_FRAME::Update3DView( const wxString* aTitle )
if( aTitle )
draw3DFrame->SetTitle( *aTitle );
draw3DFrame->NewDisplay( true );
// The 3D view update can be time consumming to rebuild a board 3D view.
// So do not use a immediate update in the board editor
bool immediate_update = true;
if( IsType( FRAME_PCB ) )
immediate_update = false;
draw3DFrame->NewDisplay( immediate_update );
return true;
}