Kicad manager: Shows the Pcb frame or the Eeschema frame as soon as possible.

Previously, they were displayed after only reading the board or the schematic
files, that can take a few seconds delay for complex boards.
This commit is contained in:
jean-pierre charras 2020-12-24 17:36:48 +01:00
parent d13de9c6c1
commit e6cbbf3661
1 changed files with 7 additions and 2 deletions

View File

@ -645,13 +645,18 @@ int KICAD_MANAGER_CONTROL::ShowPlayer( const TOOL_EVENT& aEvent )
filepath = legacy_board.GetFullPath();
}
// Show the frame (and update widgets to set valid sizes),
// after creating player and before calling OpenProjectFiles().
// Useful because loading a complex board and building its internal data can be
// time consumming
player->Show( true );
wxSafeYield();
if( !filepath.IsEmpty() )
{
if( !player->OpenProjectFiles( std::vector<wxString>( 1, filepath ) ) )
return -1;
}
player->Show( true );
}
// Needed on Windows, other platforms do not use it, but it creates no issue