diff --git a/eeschema/tools/sch_edit_tool.cpp b/eeschema/tools/sch_edit_tool.cpp index 691e9042da..47e1174198 100644 --- a/eeschema/tools/sch_edit_tool.cpp +++ b/eeschema/tools/sch_edit_tool.cpp @@ -1073,9 +1073,18 @@ void SCH_EDIT_TOOL::editFieldText( SCH_FIELD* aField ) if( aField->GetEditFlags() == 0 ) // i.e. not edited, or moved saveCopyInUndoList( aField, UNDO_REDO::CHANGED ); - wxString title = wxString::Format( _( "Edit %s Field" ), TitleCaps( aField->GetName() ) ); + KICAD_T parentType = aField->GetParent() ? aField->GetParent()->Type() : SCHEMATIC_T; + wxString caption; - DIALOG_SCH_EDIT_ONE_FIELD dlg( m_frame, title, aField ); + // Use title caps for mandatory fields. "Edit Sheet name Field" looks dorky. + if( parentType == SCH_SYMBOL_T && aField->GetId() < MANDATORY_FIELDS ) + caption.Printf( _( "Edit %s Field" ), TitleCaps( aField->GetName() ) ); + else if( parentType == SCH_SHEET_T && aField->GetId() < SHEET_MANDATORY_FIELDS ) + caption.Printf( _( "Edit %s Field" ), TitleCaps( aField->GetName() ) ); + else + caption.Printf( _( "Edit '%s' Field" ), aField->GetName() ); + + DIALOG_SCH_EDIT_ONE_FIELD dlg( m_frame, caption, aField ); // The footprint field dialog can invoke a KIWAY_PLAYER so we must use a quasi-modal if( dlg.ShowQuasiModal() != wxID_OK ) @@ -1083,7 +1092,7 @@ void SCH_EDIT_TOOL::editFieldText( SCH_FIELD* aField ) dlg.UpdateField( aField, &m_frame->GetCurrentSheet() ); - if( m_frame->eeconfig()->m_AutoplaceFields.enable || aField->GetParent()->Type() == SCH_SHEET_T ) + if( m_frame->eeconfig()->m_AutoplaceFields.enable || parentType == SCH_SHEET_T ) static_cast( aField->GetParent() )->AutoAutoplaceFields( m_frame->GetScreen() ); m_frame->UpdateItem( aField ); diff --git a/eeschema/tools/symbol_editor_edit_tool.cpp b/eeschema/tools/symbol_editor_edit_tool.cpp index 969ab7352f..864e01848d 100644 --- a/eeschema/tools/symbol_editor_edit_tool.cpp +++ b/eeschema/tools/symbol_editor_edit_tool.cpp @@ -519,8 +519,10 @@ void SYMBOL_EDITOR_EDIT_TOOL::editFieldProperties( LIB_FIELD* aField ) // current symbol. Set the dialog message to inform the user. if( aField->GetId() == VALUE_FIELD ) caption = _( "Edit Symbol Name" ); - else + else if( aField->GetId() < MANDATORY_FIELDS ) caption.Printf( _( "Edit %s Field" ), TitleCaps( aField->GetName() ) ); + else + caption.Printf( _( "Edit '%s' Field" ), aField->GetName() ); DIALOG_LIB_EDIT_ONE_FIELD dlg( m_frame, caption, aField );