diff --git a/kicad/dialogs/dialog_template_selector.cpp b/kicad/dialogs/dialog_template_selector.cpp index f36f66d978..b2fa1e4530 100644 --- a/kicad/dialogs/dialog_template_selector.cpp +++ b/kicad/dialogs/dialog_template_selector.cpp @@ -107,7 +107,7 @@ void DIALOG_TEMPLATE_SELECTOR::onNotebookResize(wxSizeEvent& event) void DIALOG_TEMPLATE_SELECTOR::OnPageChange( wxNotebookEvent& event ) { - int page = m_notebook->GetSelection(); + int page = event.GetSelection(); if( page != wxNOT_FOUND && (unsigned)page < m_panels.size() ) m_tcTemplatePath->SetValue( m_panels[page]->GetPath() ); @@ -219,9 +219,6 @@ void DIALOG_TEMPLATE_SELECTOR::onDirectoryBrowseClicked( wxCommandEvent& event ) m_tcTemplatePath->SetValue( dirName.GetFullPath() ); - if( currPath == m_tcTemplatePath->GetValue() ) - return; // No change - // Rebuild the page from the new templates path: replaceCurrentPage(); } @@ -236,9 +233,6 @@ void DIALOG_TEMPLATE_SELECTOR::onValidatePath( wxCommandEvent& event ) wxString currPath = m_tcTemplatePath->GetValue(); - if( currPath == m_panels[page]->GetPath() ) // No change - return; - wxFileName fn; fn.AssignDir( m_tcTemplatePath->GetValue() ); fn.Normalize();