diff --git a/eeschema/class_libentry.cpp b/eeschema/class_libentry.cpp index d2883f0c32..fc1954c97e 100644 --- a/eeschema/class_libentry.cpp +++ b/eeschema/class_libentry.cpp @@ -86,8 +86,8 @@ LIB_ALIAS::~LIB_ALIAS() wxASSERT_MSG( shared, wxT( "~LIB_ALIAS() without a LIB_PART" ) ); #if defined(DEBUG) && 1 - printf( "%s: destroying alias:'%s' of part:'%s' alias count:%zd.\n", - __func__, TO_UTF8( name ), TO_UTF8( shared->GetName() ), shared->m_aliases.size() ); + printf( "%s: destroying alias:'%s' of part:'%s' alias count:%d.\n", + __func__, TO_UTF8( name ), TO_UTF8( shared->GetName() ), int( shared->m_aliases.size() ) ); #endif if( shared ) @@ -249,8 +249,8 @@ LIB_PART::~LIB_PART() (void) breakhere; } - printf( "%s: destroying part '%s' with alias list count of %zd\n", - __func__, TO_UTF8( GetName() ), m_aliases.size() ); + printf( "%s: destroying part '%s' with alias list count of %d\n", + __func__, TO_UTF8( GetName() ), int( m_aliases.size() ) ); #endif // If the part is being deleted directly rather than through the library, @@ -1112,6 +1112,7 @@ void LIB_PART::SetFields( const std::vector & aFields ) // drawings is a ptr_vector, new and copy an object on the heap. LIB_FIELD* field = new LIB_FIELD( aFields[i] ); + field->SetParent( this ); drawings.push_back( field ); } diff --git a/eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp b/eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp index 10c91b952c..488fa83715 100644 --- a/eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp +++ b/eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp @@ -136,7 +136,7 @@ private: void LIB_EDIT_FRAME::InstallFieldsEditorDialog( wxCommandEvent& event ) { - if( !GetCurLib() ) + if( !GetCurPart() ) return; m_canvas->EndMouseCapture( ID_NO_TOOL_SELECTED, m_canvas->GetDefaultCursor() ); diff --git a/eeschema/libfield.cpp b/eeschema/libfield.cpp index 37d332d029..451ebb11b0 100644 --- a/eeschema/libfield.cpp +++ b/eeschema/libfield.cpp @@ -48,6 +48,8 @@ void LIB_EDIT_FRAME::EditField( LIB_FIELD* aField ) LIB_PART* parent = aField->GetParent(); + wxASSERT( parent ); + // 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. if( aField->GetId() == VALUE ) diff --git a/kicad/menubar.cpp b/kicad/menubar.cpp index 4ddcbf2b4c..ae2aac01cc 100644 --- a/kicad/menubar.cpp +++ b/kicad/menubar.cpp @@ -267,7 +267,7 @@ void KICAD_MANAGER_FRAME::ReCreateMenuBar() // Contents AddMenuItem( helpMenu, wxID_HELP, - _( "KiCad Manual" ), + _( "KiCad &Manual" ), _( "Open KiCad user manual" ), KiBitmap( online_help_xpm ) );