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,13 +83,13 @@ static wxAcceleratorEntry accels[] = ...@@ -83,13 +83,13 @@ static wxAcceleratorEntry accels[] =
LIB_VIEW_FRAME::LIB_VIEW_FRAME( wxWindow* father, CMP_LIBRARY* Library, wxSemaphore* semaphore ) : 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 ) wxDefaultPosition, wxDefaultSize )
{ {
wxAcceleratorTable table( ACCEL_TABLE_CNT, accels ); wxAcceleratorTable table( ACCEL_TABLE_CNT, accels );
m_FrameName = wxT( "ViewlibFrame" ); m_FrameName = wxT( "ViewlibFrame" );
m_ConfigPath = wxT( "LibraryViewer" ); m_ConfigPath = wxT( "LibraryViewer" );
// Give an icon // Give an icon
SetIcon( wxIcon( library_browse_xpm ) ); SetIcon( wxIcon( library_browse_xpm ) );
...@@ -103,7 +103,7 @@ LIB_VIEW_FRAME::LIB_VIEW_FRAME( wxWindow* father, CMP_LIBRARY* Library, wxSemaph ...@@ -103,7 +103,7 @@ LIB_VIEW_FRAME::LIB_VIEW_FRAME( wxWindow* father, CMP_LIBRARY* Library, wxSemaph
m_exportToEeschemaCmpName.Empty(); m_exportToEeschemaCmpName.Empty();
if( m_Semaphore ) if( m_Semaphore )
SetWindowStyle( GetWindowStyle() | wxSTAY_ON_TOP ); SetWindowStyle( GetWindowStyle() | wxFRAME_FLOAT_ON_PARENT );
SetScreen( new SCH_SCREEN() ); SetScreen( new SCH_SCREEN() );
GetScreen()->m_Center = true; // Center coordinate origins on screen. GetScreen()->m_Center = true; // Center coordinate origins on screen.
...@@ -251,6 +251,16 @@ void LIB_VIEW_FRAME::OnCloseWindow( wxCloseEvent& Event ) ...@@ -251,6 +251,16 @@ void LIB_VIEW_FRAME::OnCloseWindow( wxCloseEvent& Event )
m_Semaphore->Post(); m_Semaphore->Post();
Destroy(); 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