Fix assert in CvPcb when opening footprint equate file dialog.
Fixes lp:1774726 https://bugs.launchpad.net/kicad/+bug/1774726
This commit is contained in:
parent
e4a6f2e523
commit
6f65f835f4
|
@ -6,7 +6,7 @@
|
||||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
* Copyright (C) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||||
* Copyright (C) 1992-2016 KiCad Developers, see AUTHORS.txt for contributors.
|
* Copyright (C) 1992-2018 KiCad Developers, see AUTHORS.txt for contributors.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
|
@ -49,7 +49,8 @@ DIALOG_CONFIG_EQUFILES::DIALOG_CONFIG_EQUFILES( CVPCB_MAINFRAME* aParent ) :
|
||||||
m_Config = Pgm().CommonSettings();
|
m_Config = Pgm().CommonSettings();
|
||||||
|
|
||||||
PROJECT& prj = Prj();
|
PROJECT& prj = Prj();
|
||||||
SetTitle( wxString::Format( _( "Project file: \"%s\"" ), GetChars( prj.GetProjectFullName() ) ) );
|
SetTitle( wxString::Format( _( "Project file: \"%s\"" ),
|
||||||
|
GetChars( prj.GetProjectFullName() ) ) );
|
||||||
|
|
||||||
Init( );
|
Init( );
|
||||||
|
|
||||||
|
@ -57,6 +58,7 @@ DIALOG_CONFIG_EQUFILES::DIALOG_CONFIG_EQUFILES( CVPCB_MAINFRAME* aParent ) :
|
||||||
Center();
|
Center();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CVPCB_MAINFRAME::OnEditEquFilesList( wxCommandEvent& aEvent )
|
void CVPCB_MAINFRAME::OnEditEquFilesList( wxCommandEvent& aEvent )
|
||||||
{
|
{
|
||||||
DIALOG_CONFIG_EQUFILES dlg( this );
|
DIALOG_CONFIG_EQUFILES dlg( this );
|
||||||
|
@ -69,6 +71,8 @@ void DIALOG_CONFIG_EQUFILES::Init()
|
||||||
{
|
{
|
||||||
m_sdbSizerOK->SetDefault();
|
m_sdbSizerOK->SetDefault();
|
||||||
m_ListChanged = false;
|
m_ListChanged = false;
|
||||||
|
|
||||||
|
if( !m_Parent->m_EquFilesNames.IsEmpty() )
|
||||||
m_ListEquiv->InsertItems( m_Parent->m_EquFilesNames, 0 );
|
m_ListEquiv->InsertItems( m_Parent->m_EquFilesNames, 0 );
|
||||||
|
|
||||||
if( getEnvVarCount() < 2 )
|
if( getEnvVarCount() < 2 )
|
||||||
|
@ -90,6 +94,7 @@ void DIALOG_CONFIG_EQUFILES::Init()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void DIALOG_CONFIG_EQUFILES::OnEditEquFile( wxCommandEvent& event )
|
void DIALOG_CONFIG_EQUFILES::OnEditEquFile( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
wxString editorname = Pgm().GetEditorName();
|
wxString editorname = Pgm().GetEditorName();
|
||||||
|
@ -141,9 +146,7 @@ void DIALOG_CONFIG_EQUFILES::OnCloseWindow( wxCloseEvent& event )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/********************************************************************/
|
|
||||||
void DIALOG_CONFIG_EQUFILES::OnButtonMoveUp( wxCommandEvent& event )
|
void DIALOG_CONFIG_EQUFILES::OnButtonMoveUp( wxCommandEvent& event )
|
||||||
/********************************************************************/
|
|
||||||
{
|
{
|
||||||
wxArrayInt selections;
|
wxArrayInt selections;
|
||||||
|
|
||||||
|
@ -176,9 +179,7 @@ void DIALOG_CONFIG_EQUFILES::OnButtonMoveUp( wxCommandEvent& event )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*********************************************************************/
|
|
||||||
void DIALOG_CONFIG_EQUFILES::OnButtonMoveDown( wxCommandEvent& event )
|
void DIALOG_CONFIG_EQUFILES::OnButtonMoveDown( wxCommandEvent& event )
|
||||||
/*********************************************************************/
|
|
||||||
{
|
{
|
||||||
wxArrayInt selections;
|
wxArrayInt selections;
|
||||||
m_ListEquiv->GetSelections( selections );
|
m_ListEquiv->GetSelections( selections );
|
||||||
|
|
Loading…
Reference in New Issue