diff --git a/common/widgets/paged_dialog.cpp b/common/widgets/paged_dialog.cpp index 5808f4a9b1..f6409c5eda 100644 --- a/common/widgets/paged_dialog.cpp +++ b/common/widgets/paged_dialog.cpp @@ -309,7 +309,7 @@ void PAGED_DIALOG::OnPageChanged( wxBookCtrlEvent& event ) int page = event.GetSelection(); // Use the first sub-page when a tree level node is selected. - if( m_treebook->GetPageParent( page ) == wxNOT_FOUND ) + if( m_treebook->GetCurrentPage()->GetChildren().IsEmpty() ) { unsigned next = page + 1;