From fdff010199cb91c8e5cf358aaa5418a6dfc171d6 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Mon, 12 Nov 2018 17:07:22 +0000 Subject: [PATCH] Fix copy/paste errors in delayedFocusRow stuff. Fixes: lp:1802907 * https://bugs.launchpad.net/kicad/+bug/1802907 --- pcbnew/dialogs/dialog_edit_footprint_for_BoardEditor.cpp | 3 ++- pcbnew/dialogs/dialog_edit_footprint_for_fp_editor.cpp | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pcbnew/dialogs/dialog_edit_footprint_for_BoardEditor.cpp b/pcbnew/dialogs/dialog_edit_footprint_for_BoardEditor.cpp index 9989594e56..72591e1f3d 100644 --- a/pcbnew/dialogs/dialog_edit_footprint_for_BoardEditor.cpp +++ b/pcbnew/dialogs/dialog_edit_footprint_for_BoardEditor.cpp @@ -567,6 +567,7 @@ bool DIALOG_FOOTPRINT_BOARD_EDITOR::Validate() if( m_NoteBook->GetSelection() != 0 ) m_NoteBook->SetSelection( 0 ); + m_delayedFocusGrid = m_itemsGrid; m_delayedErrorMessage = _( "Text items must have some content." ); m_delayedFocusColumn = TMC_TEXT; m_delayedFocusRow = i; @@ -832,7 +833,7 @@ void DIALOG_FOOTPRINT_BOARD_EDITOR::OnUpdateUI( wxUpdateUIEvent& ) m_delayedFocusColumn = -1; m_delayedErrorMessage = wxEmptyString; - if( !m_delayedErrorMessage.IsEmpty() ) + if( !msg.IsEmpty() ) { // Do not use DisplayErrorMessage(); it screws up window order on Mac DisplayError( nullptr, msg ); diff --git a/pcbnew/dialogs/dialog_edit_footprint_for_fp_editor.cpp b/pcbnew/dialogs/dialog_edit_footprint_for_fp_editor.cpp index 643825a77e..7afef00ba9 100644 --- a/pcbnew/dialogs/dialog_edit_footprint_for_fp_editor.cpp +++ b/pcbnew/dialogs/dialog_edit_footprint_for_fp_editor.cpp @@ -520,6 +520,7 @@ bool DIALOG_FOOTPRINT_FP_EDITOR::Validate() m_NoteBook->SetSelection( 0 ); m_delayedErrorMessage = _( "Text items must have some content." ); + m_delayedFocusGrid = m_itemsGrid; m_delayedFocusColumn = TMC_TEXT; m_delayedFocusRow = i;