From 232d0e8b6b06fc8c609323e91e9c7e877f21e0ab Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sun, 21 May 2023 18:15:10 +0100 Subject: [PATCH] Reset button applies to resolved page, not lazy page holder. Fixes https://gitlab.com/kicad/code/kicad/-/issues/14786 (cherry picked from commit 10574839836941ed84e8a5d149435e306fa02d47) --- common/widgets/paged_dialog.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/widgets/paged_dialog.cpp b/common/widgets/paged_dialog.cpp index ceb78ff91e..f9ad4c005a 100644 --- a/common/widgets/paged_dialog.cpp +++ b/common/widgets/paged_dialog.cpp @@ -330,7 +330,7 @@ void PAGED_DIALOG::SetError( const wxString& aMessage, wxWindow* aPage, wxWindow void PAGED_DIALOG::UpdateResetButton( int aPage ) { - wxWindow* panel = m_treebook->GetPage( aPage ); + wxWindow* panel = m_treebook->ResolvePage( aPage ); // Enable the reset button only if the page is re-settable if( m_resetButton ) @@ -454,7 +454,7 @@ void PAGED_DIALOG::onResetButton( wxCommandEvent& aEvent ) return; // NB: dynamic_cast doesn't work over Kiway - wxWindow* panel = m_treebook->GetPage( sel ); + wxWindow* panel = m_treebook->ResolvePage( sel ); if( panel ) {