Commit 1016448c authored by Wayne Stambaugh's avatar Wayne Stambaugh

Change EESchema library viewer to stay on top of parent not all other windows.

parent 09523934
......@@ -83,7 +83,7 @@ static wxAcceleratorEntry accels[] =
LIB_VIEW_FRAME::LIB_VIEW_FRAME( wxWindow* father, CMP_LIBRARY* Library, wxSemaphore* semaphore ) :
EDA_DRAW_FRAME( father, VIEWER_FRAME, _( "Library browser" ),
EDA_DRAW_FRAME( father, VIEWER_FRAME, _( "Library Browser" ),
wxDefaultPosition, wxDefaultSize )
{
wxAcceleratorTable table( ACCEL_TABLE_CNT, accels );
......@@ -103,7 +103,7 @@ LIB_VIEW_FRAME::LIB_VIEW_FRAME( wxWindow* father, CMP_LIBRARY* Library, wxSemaph
m_exportToEeschemaCmpName.Empty();
if( m_Semaphore )
SetWindowStyle( GetWindowStyle() | wxSTAY_ON_TOP );
SetWindowStyle( GetWindowStyle() | wxFRAME_FLOAT_ON_PARENT );
SetScreen( new SCH_SCREEN() );
GetScreen()->m_Center = true; // Center coordinate origins on screen.
......@@ -251,6 +251,16 @@ void LIB_VIEW_FRAME::OnCloseWindow( wxCloseEvent& Event )
m_Semaphore->Post();
Destroy();
if( m_Semaphore )
{
// Raise EESchema above all other windows when the library viewer is being used
// to select a component.
wxWindow* parent = GetParent();
if( parent )
parent->Raise();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment