Page layout editor: fix bad initialization on startup, which can crash pl_editor when trying to edit an item.

Minor other fixes.
This commit is contained in:
jean-pierre charras 2014-06-07 18:20:23 +02:00
parent e7aa963011
commit bd174ebffe
4 changed files with 13 additions and 9 deletions

View File

@ -76,7 +76,7 @@ static EDA_HOTKEY HkMoveStartPoint( wxT( "Move Start Point" ), HK_MOVE_START_
ID_POPUP_ITEM_MOVE_START_POINT );
static EDA_HOTKEY HkMoveEndPoint( wxT( "Move End Point" ), HK_MOVE_END_POINT, 'E',
ID_POPUP_ITEM_MOVE_END_POINT );
static EDA_HOTKEY HkDeleteItem( wxT( "Move Item" ), HK_DELETE_ITEM, WXK_DELETE,
static EDA_HOTKEY HkDeleteItem( wxT( "Delete Item" ), HK_DELETE_ITEM, WXK_DELETE,
ID_POPUP_ITEM_DELETE );
// Undo Redo

View File

@ -65,13 +65,6 @@ static struct IFACE : public KIFACE_I
case FRAME_PL_EDITOR:
{
PL_EDITOR_FRAME* frame = new PL_EDITOR_FRAME( aKiway, aParent );
/* Is this really needed since at this point there is no open file?
frame->Zoom_Automatique( true ); // Zoom fit in frame
if so, why is the constructor not doing it?
*/
return frame;
}
break;

View File

@ -171,6 +171,16 @@ PL_EDITOR_FRAME::PL_EDITOR_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
wxAuiPaneInfo( mesg ).Name( wxT( "MsgPanel" ) ).Bottom().Layer( 10 ) );
m_auimgr.Update();
// Initialize the current page layout
WORKSHEET_LAYOUT& pglayout = WORKSHEET_LAYOUT::GetTheInstance();
#if 0 //start with empty layout
pglayout.AllowVoidList( true );
pglayout.ClearList();
#else // start with the default Kicad layout
pglayout.SetPageLayout();
#endif
OnNewPageLayout();
}
@ -744,5 +754,6 @@ void PL_EDITOR_FRAME::OnNewPageLayout()
GetScreen()->ClrModify();
m_propertiesPagelayout->CopyPrmsFromGeneralToPanel();
RebuildDesignTree();
Zoom_Automatique( true );
m_canvas->Refresh();
}

View File

@ -67,7 +67,7 @@ const LAYER_WIDGET::ROW PCB_LAYER_WIDGET::s_render_rows[] = {
RR( _( "Pads Front" ), PAD_FR_VISIBLE, WHITE, _( "Show footprint pads on board's front" ) ),
RR( _( "Pads Back" ), PAD_BK_VISIBLE, WHITE, _( "Show footprint pads on board's back" ) ),
RR( _( "Text Front" ), MOD_TEXT_FR_VISIBLE, WHITE, _( "Show footprint text on board's back" ) ),
RR( _( "Text Front" ), MOD_TEXT_FR_VISIBLE, WHITE, _( "Show footprint text on board's front" ) ),
RR( _( "Text Back" ), MOD_TEXT_BK_VISIBLE, WHITE, _( "Show footprint text on board's back" ) ),
RR( _( "Hidden Text" ), MOD_TEXT_INVISIBLE, WHITE, _( "Show footprint text marked as invisible" ) ),