Commit 347f32cc authored by jean-pierre charras's avatar jean-pierre charras

Pcbnew: try to fix a minot but old issue when movint the layer manager frame

parent 91e26fe8
...@@ -324,6 +324,8 @@ WinEDA_PcbFrame::WinEDA_PcbFrame( wxWindow* father, ...@@ -324,6 +324,8 @@ WinEDA_PcbFrame::WinEDA_PcbFrame( wxWindow* father,
m_auimgr.SetManagedWindow( this ); m_auimgr.SetManagedWindow( this );
// Create a wxAuiPaneInfo template for other wxAuiPaneInfo items
// Actual wxAuiPaneInfo items will be built from this item.
wxAuiPaneInfo horiz; wxAuiPaneInfo horiz;
horiz.Gripper( false ); horiz.Gripper( false );
horiz.DockFixed( true ); horiz.DockFixed( true );
...@@ -332,11 +334,16 @@ WinEDA_PcbFrame::WinEDA_PcbFrame( wxWindow* father, ...@@ -332,11 +334,16 @@ WinEDA_PcbFrame::WinEDA_PcbFrame( wxWindow* father,
horiz.CloseButton( false ); horiz.CloseButton( false );
horiz.CaptionVisible( false ); horiz.CaptionVisible( false );
// Create a second template from the first:
wxAuiPaneInfo vert( horiz ); wxAuiPaneInfo vert( horiz );
// Set specific options for horizontal and vertical toolbars, using horiz and vert
// wxAuiPaneInfo items to manage them.
vert.TopDockable( false ).BottomDockable( false ); vert.TopDockable( false ).BottomDockable( false );
horiz.LeftDockable( false ).RightDockable( false ); horiz.LeftDockable( false ).RightDockable( false );
horiz.ToolbarPane().Gripper( false );
// Create a wxAuiPaneInfo for the Layers Manager, not derived from the template.
// LAYER_WIDGET is floatable, but initially docked at far right // LAYER_WIDGET is floatable, but initially docked at far right
wxAuiPaneInfo lyrs; wxAuiPaneInfo lyrs;
lyrs.MinSize( m_Layers->GetBestSize() ); // updated in ReFillLayerWidget lyrs.MinSize( m_Layers->GetBestSize() ); // updated in ReFillLayerWidget
...@@ -347,12 +354,16 @@ WinEDA_PcbFrame::WinEDA_PcbFrame( wxWindow* father, ...@@ -347,12 +354,16 @@ WinEDA_PcbFrame::WinEDA_PcbFrame( wxWindow* father,
if( m_HToolBar ) if( m_HToolBar )
{
m_auimgr.AddPane( m_HToolBar, m_auimgr.AddPane( m_HToolBar,
wxAuiPaneInfo( horiz ).Name( wxT( "m_HToolBar" ) ).Top().Row( 0 ) ); wxAuiPaneInfo( horiz ).Name( wxT( "m_HToolBar" ) ).Top().Row( 0 ) );
}
if( m_AuxiliaryToolBar ) if( m_AuxiliaryToolBar )
{
m_auimgr.AddPane( m_AuxiliaryToolBar, m_auimgr.AddPane( m_AuxiliaryToolBar,
wxAuiPaneInfo( horiz ).Name( wxT( "m_AuxiliaryToolBar" ) ).Top().Row( 1 ) ); wxAuiPaneInfo( horiz ).Name( wxT( "m_AuxiliaryToolBar" ) ).Top().Row( 1 ) );
}
if( m_AuxVToolBar ) if( m_AuxVToolBar )
m_auimgr.AddPane( m_AuxVToolBar, m_auimgr.AddPane( m_AuxVToolBar,
...@@ -367,7 +378,8 @@ WinEDA_PcbFrame::WinEDA_PcbFrame( wxWindow* father, ...@@ -367,7 +378,8 @@ WinEDA_PcbFrame::WinEDA_PcbFrame( wxWindow* father,
if( m_OptionsToolBar ) if( m_OptionsToolBar )
{ {
m_auimgr.AddPane( m_OptionsToolBar, m_auimgr.AddPane( m_OptionsToolBar,
wxAuiPaneInfo( vert ).Name( wxT( "m_OptionsToolBar" ) ).Left() ); wxAuiPaneInfo( vert ).Name( wxT( "m_OptionsToolBar" ) ).Left()
.ToolbarPane().Gripper( false ));
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_MANAGE_LAYERS_VERTICAL_TOOLBAR, m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_MANAGE_LAYERS_VERTICAL_TOOLBAR,
m_show_layer_manager_tools ); m_show_layer_manager_tools );
m_auimgr.GetPane( wxT( "m_LayersManagerToolBar" ) ).Show( m_show_layer_manager_tools ); m_auimgr.GetPane( wxT( "m_LayersManagerToolBar" ) ).Show( m_show_layer_manager_tools );
...@@ -384,11 +396,11 @@ WinEDA_PcbFrame::WinEDA_PcbFrame( wxWindow* father, ...@@ -384,11 +396,11 @@ WinEDA_PcbFrame::WinEDA_PcbFrame( wxWindow* father,
m_auimgr.AddPane( MsgPanel, m_auimgr.AddPane( MsgPanel,
wxAuiPaneInfo( horiz ).Name( wxT( "MsgPanel" ) ).Bottom() ); wxAuiPaneInfo( horiz ).Name( wxT( "MsgPanel" ) ).Bottom() );
m_auimgr.Update();
SetToolbars(); SetToolbars();
ReFillLayerWidget(); // this is near end because contents establish size ReFillLayerWidget(); // this is near end because contents establish size
syncLayerWidget(); syncLayerWidget();
m_auimgr.Update();
} }
......
...@@ -288,6 +288,7 @@ void WinEDA_PcbFrame::ReCreateHToolbar() ...@@ -288,6 +288,7 @@ void WinEDA_PcbFrame::ReCreateHToolbar()
wxBitmap( web_support_xpm ), wxBitmap( web_support_xpm ),
_( "Fast access to the Web Based FreeROUTE advanced router" ) ); _( "Fast access to the Web Based FreeROUTE advanced router" ) );
m_HToolBar->AddSeparator();
// after adding the buttons to the toolbar, must call Realize() to reflect // after adding the buttons to the toolbar, must call Realize() to reflect
// the changes // the changes
...@@ -391,6 +392,7 @@ void WinEDA_PcbFrame::ReCreateOptToolbar() ...@@ -391,6 +392,7 @@ void WinEDA_PcbFrame::ReCreateOptToolbar()
wxITEM_CHECK ); wxITEM_CHECK );
m_OptionsToolBar->AddSeparator();
m_OptionsToolBar->Realize(); m_OptionsToolBar->Realize();
} }
...@@ -674,6 +676,7 @@ an existing track use its width\notherwise, use current width setting" ), ...@@ -674,6 +676,7 @@ an existing track use its width\notherwise, use current width setting" ),
} }
m_TrackAndViasSizesList_Changed = true; m_TrackAndViasSizesList_Changed = true;
m_AuxiliaryToolBar->AddSeparator();
ReCreateLayerBox( NULL ); ReCreateLayerBox( NULL );
} }
......
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