Commit fa967807 authored by jean-pierre charras's avatar jean-pierre charras

eeschema: fix Bug #1385789 (eeschema segfaults, when editing a new field). Fix...

eeschema: fix Bug #1385789 (eeschema segfaults, when editing a new field). Fix an other minor bug in Footprint editor.
parent 5034f07a
...@@ -86,8 +86,8 @@ LIB_ALIAS::~LIB_ALIAS() ...@@ -86,8 +86,8 @@ LIB_ALIAS::~LIB_ALIAS()
wxASSERT_MSG( shared, wxT( "~LIB_ALIAS() without a LIB_PART" ) ); wxASSERT_MSG( shared, wxT( "~LIB_ALIAS() without a LIB_PART" ) );
#if defined(DEBUG) && 1 #if defined(DEBUG) && 1
printf( "%s: destroying alias:'%s' of part:'%s' alias count:%zd.\n", printf( "%s: destroying alias:'%s' of part:'%s' alias count:%d.\n",
__func__, TO_UTF8( name ), TO_UTF8( shared->GetName() ), shared->m_aliases.size() ); __func__, TO_UTF8( name ), TO_UTF8( shared->GetName() ), int( shared->m_aliases.size() ) );
#endif #endif
if( shared ) if( shared )
...@@ -249,8 +249,8 @@ LIB_PART::~LIB_PART() ...@@ -249,8 +249,8 @@ LIB_PART::~LIB_PART()
(void) breakhere; (void) breakhere;
} }
printf( "%s: destroying part '%s' with alias list count of %zd\n", printf( "%s: destroying part '%s' with alias list count of %d\n",
__func__, TO_UTF8( GetName() ), m_aliases.size() ); __func__, TO_UTF8( GetName() ), int( m_aliases.size() ) );
#endif #endif
// If the part is being deleted directly rather than through the library, // If the part is being deleted directly rather than through the library,
...@@ -1112,6 +1112,7 @@ void LIB_PART::SetFields( const std::vector <LIB_FIELD>& aFields ) ...@@ -1112,6 +1112,7 @@ void LIB_PART::SetFields( const std::vector <LIB_FIELD>& aFields )
// drawings is a ptr_vector, new and copy an object on the heap. // drawings is a ptr_vector, new and copy an object on the heap.
LIB_FIELD* field = new LIB_FIELD( aFields[i] ); LIB_FIELD* field = new LIB_FIELD( aFields[i] );
field->SetParent( this );
drawings.push_back( field ); drawings.push_back( field );
} }
......
...@@ -136,7 +136,7 @@ private: ...@@ -136,7 +136,7 @@ private:
void LIB_EDIT_FRAME::InstallFieldsEditorDialog( wxCommandEvent& event ) void LIB_EDIT_FRAME::InstallFieldsEditorDialog( wxCommandEvent& event )
{ {
if( !GetCurLib() ) if( !GetCurPart() )
return; return;
m_canvas->EndMouseCapture( ID_NO_TOOL_SELECTED, m_canvas->GetDefaultCursor() ); m_canvas->EndMouseCapture( ID_NO_TOOL_SELECTED, m_canvas->GetDefaultCursor() );
......
...@@ -48,6 +48,8 @@ void LIB_EDIT_FRAME::EditField( LIB_FIELD* aField ) ...@@ -48,6 +48,8 @@ void LIB_EDIT_FRAME::EditField( LIB_FIELD* aField )
LIB_PART* parent = aField->GetParent(); LIB_PART* parent = aField->GetParent();
wxASSERT( parent );
// Editing the component value field is equivalent to creating a new component based // Editing the component value field is equivalent to creating a new component based
// on the current component. Set the dialog message to inform the user. // on the current component. Set the dialog message to inform the user.
if( aField->GetId() == VALUE ) if( aField->GetId() == VALUE )
......
...@@ -267,7 +267,7 @@ void KICAD_MANAGER_FRAME::ReCreateMenuBar() ...@@ -267,7 +267,7 @@ void KICAD_MANAGER_FRAME::ReCreateMenuBar()
// Contents // Contents
AddMenuItem( helpMenu, wxID_HELP, AddMenuItem( helpMenu, wxID_HELP,
_( "KiCad Manual" ), _( "KiCad &Manual" ),
_( "Open KiCad user manual" ), _( "Open KiCad user manual" ),
KiBitmap( online_help_xpm ) ); KiBitmap( online_help_xpm ) );
......
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