Reset button applies to resolved page, not lazy page holder.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14786

(cherry picked from commit 1057483983)
This commit is contained in:
Jeff Young 2023-05-21 18:15:10 +01:00
parent 0d94532df9
commit 232d0e8b6b
1 changed files with 2 additions and 2 deletions

View File

@ -330,7 +330,7 @@ void PAGED_DIALOG::SetError( const wxString& aMessage, wxWindow* aPage, wxWindow
void PAGED_DIALOG::UpdateResetButton( int aPage ) 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 // Enable the reset button only if the page is re-settable
if( m_resetButton ) if( m_resetButton )
@ -454,7 +454,7 @@ void PAGED_DIALOG::onResetButton( wxCommandEvent& aEvent )
return; return;
// NB: dynamic_cast doesn't work over Kiway // NB: dynamic_cast doesn't work over Kiway
wxWindow* panel = m_treebook->GetPage( sel ); wxWindow* panel = m_treebook->ResolvePage( sel );
if( panel ) if( panel )
{ {