From 89e9857f3d0eac988469b0fabde90b4a98253a66 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Wed, 9 Oct 2019 18:53:41 +0200 Subject: [PATCH] Fp editor, DIALOG_FOOTPRINT_FP_EDITOR: fix a very annoying issue: the value field was copuled to the fp name. Unlike schematic symbols, the value field and the footprint name are 2 different fields. So coupling these fields in the DIALOG_FOOTPRINT_FP_EDITOR dialog created serious issues. Fixes: lp:1846533 https://bugs.launchpad.net/kicad/+bug/1846533 --- .../dialog_edit_footprint_for_fp_editor.cpp | 34 ++----------------- 1 file changed, 3 insertions(+), 31 deletions(-) diff --git a/pcbnew/dialogs/dialog_edit_footprint_for_fp_editor.cpp b/pcbnew/dialogs/dialog_edit_footprint_for_fp_editor.cpp index cf344681d7..a1818a23e7 100644 --- a/pcbnew/dialogs/dialog_edit_footprint_for_fp_editor.cpp +++ b/pcbnew/dialogs/dialog_edit_footprint_for_fp_editor.cpp @@ -679,26 +679,7 @@ static bool footprintIsFromBoard( MODULE* aFootprint ) void DIALOG_FOOTPRINT_FP_EDITOR::OnGridCellChanging( wxGridEvent& event ) { - if( event.GetRow() == 1 && event.GetCol() == TMC_TEXT ) - { - if( !checkFootprintName( event.GetString() ) ) - { - event.Veto(); - - if( m_NoteBook->GetSelection() != 0 ) - m_NoteBook->SetSelection( 0 ); - - m_delayedFocusGrid = m_itemsGrid; - m_delayedFocusRow = event.GetRow(); - m_delayedFocusColumn = event.GetCol(); - m_delayedFocusPage = 0; - } - else if( !footprintIsFromBoard( m_footprint ) ) - { - // Keep Name and Value of footprints in library in sync - m_FootprintNameCtrl->ChangeValue( event.GetString() ); - } - } + // Currently: nothing to do } @@ -706,8 +687,7 @@ void DIALOG_FOOTPRINT_FP_EDITOR::OnFootprintNameText( wxCommandEvent& event ) { if( !footprintIsFromBoard( m_footprint ) ) { - // Keep Name and Value of footprints in library in sync - m_itemsGrid->SetCellValue( 1, TMC_TEXT, m_FootprintNameCtrl->GetValue() ); + // Currently: nothing to do } } @@ -807,15 +787,7 @@ void DIALOG_FOOTPRINT_FP_EDITOR::OnUpdateUI( wxUpdateUIEvent& event ) if( m_itemsGrid->IsCellEditControlShown() ) { - int row = m_itemsGrid->GetGridCursorRow(); - int col = m_itemsGrid->GetGridCursorCol(); - - if( row == 1 && col == TMC_TEXT ) - { - wxGridCellEditor* editor = m_itemsGrid->GetCellEditor( row, col ); - m_FootprintNameCtrl->ChangeValue( editor->GetValue() ); - editor->DecRef(); - } + // Currently: nonthing to do } // Handle a delayed focus. The delay allows us to: