From 093f810df33878f3d241ec55c9b599c3b0b65e40 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Tue, 3 Jun 2014 10:31:58 -0500 Subject: [PATCH] wxFrame GetParent() strategy is obsolete, use Kiway().Player() --- eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp b/eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp index 37831227d9..4378cc00c9 100644 --- a/eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp +++ b/eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp @@ -507,8 +507,9 @@ void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::initBuffers() // Add template fieldnames: // Now copy in the template fields, in the order that they are present in the // template field editor UI. - const TEMPLATE_FIELDNAMES& tfnames = - ((SCH_EDIT_FRAME*)m_parent->GetParent())->GetTemplateFieldNames(); + SCH_EDIT_FRAME* editor = (SCH_EDIT_FRAME*) Kiway().Player( FRAME_SCH, true ); + + const TEMPLATE_FIELDNAMES& tfnames = editor->GetTemplateFieldNames(); for( TEMPLATE_FIELDNAMES::const_iterator it = tfnames.begin(); it!=tfnames.end(); ++it ) {