Minor fixes. In stand alone show the frame as soon as possible.
Especially when running Pcbnew to open a complex board the frame is shown faster. Add also a busy cursor when loading files and building the data.
This commit is contained in:
parent
96c935673e
commit
eb7dc6ddd9
|
@ -391,6 +391,14 @@ bool PGM_SINGLE_TOP::OnPgmInit()
|
|||
|
||||
App().SetTopWindow( frame ); // wxApp gets a face.
|
||||
|
||||
// Allocate a slice of time to show the frame and update wxWidgets widgets
|
||||
// (especially setting valid sizes) after creating frame and before calling
|
||||
// OpenProjectFiles() that can update/use some widgets.
|
||||
// The 2 calls to wxSafeYield are needed on wxGTK for best results.
|
||||
wxSafeYield();
|
||||
frame->Show();
|
||||
wxSafeYield();
|
||||
|
||||
// Individual frames may provide additional option/switch processing, but for compatibility,
|
||||
// any positional arguments are treated as a list of files to pass to OpenProjectFiles
|
||||
frame->ParseArgs( parser );
|
||||
|
@ -448,7 +456,5 @@ bool PGM_SINGLE_TOP::OnPgmInit()
|
|||
}
|
||||
}
|
||||
|
||||
frame->Show();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -157,7 +157,7 @@ void WX_INFOBAR::Dismiss()
|
|||
void WX_INFOBAR::onSize( wxSizeEvent& aEvent )
|
||||
{
|
||||
int barWidth = GetSize().GetWidth();
|
||||
int parentWidth = m_parent->GetSize().GetWidth();
|
||||
int parentWidth = m_parent->GetClientSize().GetWidth();
|
||||
|
||||
if( barWidth != parentWidth )
|
||||
SetSize( parentWidth, GetSize().GetHeight() );
|
||||
|
|
|
@ -277,6 +277,10 @@ bool SCH_EDIT_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, in
|
|||
return false;
|
||||
}
|
||||
|
||||
// Loading a complex project and build data can be time
|
||||
// consumming, so display a busy cursor
|
||||
wxBusyCursor dummy;
|
||||
|
||||
// unload current project file before loading new
|
||||
{
|
||||
SetScreen( nullptr );
|
||||
|
|
|
@ -575,6 +575,10 @@ bool PCB_EDIT_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, in
|
|||
return false;
|
||||
}
|
||||
|
||||
// Loading a complex project and build data can be time
|
||||
// consumming, so display a busy cursor
|
||||
wxBusyCursor dummy;
|
||||
|
||||
// Unlink the old project if needed
|
||||
GetBoard()->ClearProject();
|
||||
|
||||
|
|
Loading…
Reference in New Issue