Reset delayedFocusPage even if it's already the right page.

Fixes: lp:1804315
* https://bugs.launchpad.net/kicad/+bug/1804315
This commit is contained in:
Jeff Young 2018-11-20 22:58:40 +00:00
parent ad9916a93d
commit 5a74b55074
1 changed files with 4 additions and 2 deletions

View File

@ -793,9 +793,11 @@ void DIALOG_FOOTPRINT_FP_EDITOR::OnUpdateUI( wxUpdateUIEvent& event )
// b) show the correct notebook page in the background before the error dialog comes up
// when triggered from an OK or a notebook page change
if( m_delayedFocusPage >= 0 && m_NoteBook->GetSelection() != m_delayedFocusPage )
if( m_delayedFocusPage >= 0 )
{
if( m_NoteBook->GetSelection() != m_delayedFocusPage )
m_NoteBook->SetSelection( (unsigned) m_delayedFocusPage );
m_delayedFocusPage = -1;
}