Fix issues on Unbuntu Unity (dialogs/frames not raised when they are created and shown)
This commit is contained in:
commit
5fb7c211f9
|
@ -111,10 +111,8 @@ bool DIALOG_SHIM::Show( bool show )
|
||||||
// If showing, use previous position and size.
|
// If showing, use previous position and size.
|
||||||
if( show )
|
if( show )
|
||||||
{
|
{
|
||||||
|
wxDialog::Raise(); // Needed on OS X and some other window managers (i.e. Unity)
|
||||||
ret = wxDialog::Show( show );
|
ret = wxDialog::Show( show );
|
||||||
#ifdef __WXMAC__
|
|
||||||
wxDialog::Raise(); // More wxWindows brokenness on OS X
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// classname is key, returns a zeroed out default EDA_RECT if none existed before.
|
// classname is key, returns a zeroed out default EDA_RECT if none existed before.
|
||||||
EDA_RECT r = class_map[ hash_key ];
|
EDA_RECT r = class_map[ hash_key ];
|
||||||
|
|
|
@ -287,6 +287,7 @@ LIB_EDIT_FRAME::LIB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
||||||
|
|
||||||
m_auimgr.Update();
|
m_auimgr.Update();
|
||||||
|
|
||||||
|
Raise();
|
||||||
Show( true );
|
Show( true );
|
||||||
|
|
||||||
wxCommandEvent evt( wxEVT_COMMAND_MENU_SELECTED, ID_ZOOM_PAGE );
|
wxCommandEvent evt( wxEVT_COMMAND_MENU_SELECTED, ID_ZOOM_PAGE );
|
||||||
|
|
|
@ -231,7 +231,10 @@ LIB_VIEW_FRAME::LIB_VIEW_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrame
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if( !IsModal() ) // For modal mode, calling ShowModal() will show this frame
|
if( !IsModal() ) // For modal mode, calling ShowModal() will show this frame
|
||||||
|
{
|
||||||
|
Raise();
|
||||||
Show( true );
|
Show( true );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -202,8 +202,6 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
|
||||||
if( !editor )
|
if( !editor )
|
||||||
{
|
{
|
||||||
editor = (FOOTPRINT_EDIT_FRAME*) Kiway().Player( FRAME_PCB_MODULE_EDITOR, true );
|
editor = (FOOTPRINT_EDIT_FRAME*) Kiway().Player( FRAME_PCB_MODULE_EDITOR, true );
|
||||||
|
|
||||||
editor->Show( true );
|
|
||||||
editor->Zoom_Automatique( false );
|
editor->Zoom_Automatique( false );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -230,8 +228,6 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
|
||||||
if( !viewer )
|
if( !viewer )
|
||||||
{
|
{
|
||||||
viewer = (FOOTPRINT_VIEWER_FRAME*) Kiway().Player( FRAME_PCB_MODULE_VIEWER, true );
|
viewer = (FOOTPRINT_VIEWER_FRAME*) Kiway().Player( FRAME_PCB_MODULE_VIEWER, true );
|
||||||
|
|
||||||
viewer->Show( true );
|
|
||||||
viewer->Zoom_Automatique( false );
|
viewer->Zoom_Automatique( false );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -871,10 +867,6 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
|
||||||
|
|
||||||
editor->Load_Module_From_BOARD( (MODULE*)GetCurItem() );
|
editor->Load_Module_From_BOARD( (MODULE*)GetCurItem() );
|
||||||
SetCurItem( NULL ); // the current module could be deleted by
|
SetCurItem( NULL ); // the current module could be deleted by
|
||||||
|
|
||||||
editor->Show( true );
|
|
||||||
|
|
||||||
editor->Raise(); // Iconize( false );
|
|
||||||
}
|
}
|
||||||
m_canvas->MoveCursorToCrossHair();
|
m_canvas->MoveCursorToCrossHair();
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -333,6 +333,9 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
||||||
|
|
||||||
m_auimgr.Update();
|
m_auimgr.Update();
|
||||||
|
|
||||||
|
Raise(); // On some window managers, this is needed
|
||||||
|
Show( true );
|
||||||
|
|
||||||
Zoom_Automatique( false );
|
Zoom_Automatique( false );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -260,12 +260,6 @@ FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME( KIWAY* aKiway, wxWindow* aParent
|
||||||
m_auimgr.GetPane( m_mainToolBar ).BestSize( tbsize );
|
m_auimgr.GetPane( m_mainToolBar ).BestSize( tbsize );
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0 // no.
|
|
||||||
// Set min size (overwrite params read in LoadPerspective(), if any)
|
|
||||||
m_auimgr.GetPane( m_libList ).MinSize( minsize );
|
|
||||||
m_auimgr.GetPane( m_footprintList ).MinSize( minsize );
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// after changing something to the aui manager,
|
// after changing something to the aui manager,
|
||||||
// call Update()() to reflect the changes
|
// call Update()() to reflect the changes
|
||||||
m_auimgr.Update();
|
m_auimgr.Update();
|
||||||
|
@ -280,8 +274,10 @@ FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME( KIWAY* aKiway, wxWindow* aParent
|
||||||
UseGalCanvas( parentFrame->IsGalCanvasActive() );
|
UseGalCanvas( parentFrame->IsGalCanvasActive() );
|
||||||
|
|
||||||
if( !IsModal() ) // For modal mode, calling ShowModal() will show this frame
|
if( !IsModal() ) // For modal mode, calling ShowModal() will show this frame
|
||||||
|
{
|
||||||
|
Raise(); // On some window managers, this is needed
|
||||||
Show( true );
|
Show( true );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue