Commit 79139b65 authored by jean-pierre charras's avatar jean-pierre charras

fixed bugs 587176 and 587175

parent 4a11fb36
......@@ -369,6 +369,7 @@ void WinEDA_SchematicFrame::EditComponentFootprint( SCH_COMPONENT* Cmp, wxDC* DC
return;
SCH_FIELD* TextField = Cmp->GetField( FOOTPRINT );
message = TextField->m_Text;
if( Get_Message( _( "Footprint" ), _( "Component footprint" ), message, this ) )
return; // edition cancelled by user.
......
......@@ -24,6 +24,7 @@
#include "build_version.h"
const wxString g_KicadPrjFilenameExtension(wxT(".pro") );
/* Import functions */
char* GetFileName( char* FullPathName );
......
......@@ -15,6 +15,8 @@
#include "wxstruct.h"
#include "appl_wxstruct.h"
extern const wxString g_KicadPrjFilenameExtension;
class RIGHT_KM_FRAME;
class TREEPROJECTFILES;
class TREE_PROJECT_FRAME;
......
......@@ -27,7 +27,7 @@ void WinEDA_MainFrame::CreateNewProject( const wxString PrjFullFileName )
wxFileName newProjectName = PrjFullFileName;
/* Init default config filename */
filename = wxGetApp().FindLibraryPath( wxT( "kicad.pro" ) );
filename = wxGetApp().FindLibraryPath( wxT( "kicad" ) + g_KicadPrjFilenameExtension);
/* Check if file kicad.pro exist in template directory */
if( wxFileName::FileExists( filename ) )
......@@ -86,7 +86,16 @@ void WinEDA_MainFrame::OnLoadProject( wxCommandEvent& event )
m_ProjectFileName = dlg.GetPath();
if( event.GetId() == ID_NEW_PROJECT )
{
// Ensure project filename extension is .pro
wxString fullname = m_ProjectFileName.GetFullPath();
if ( !fullname.EndsWith( g_KicadPrjFilenameExtension ) )
{
fullname += g_KicadPrjFilenameExtension;
m_ProjectFileName.SetFullName( fullname );
}
CreateNewProject( m_ProjectFileName.GetFullPath() );
}
SetLastProject( m_ProjectFileName.GetFullPath() );
}
......@@ -98,7 +107,7 @@ void WinEDA_MainFrame::OnLoadProject( wxCommandEvent& event )
wxString filename = m_ProjectFileName.GetFullName();
wxString nameless_prj = NAMELESS_PROJECT;
nameless_prj += wxT(".pro");
nameless_prj += g_KicadPrjFilenameExtension;
if( !m_ProjectFileName.FileExists() && !filename.IsSameAs(nameless_prj))
{
DisplayError( this, _( "Kicad project file <" ) +
......
......@@ -24,7 +24,7 @@
/* Note about the tree project build process:
* Building the tree project can be *very* long if there are a lot of subdirectories
* in the working directory.
* Unfornately, this happens easily if the project file *.pro is in the home directory
* Unfortunately, this happens easily if the project file *.pro is in the home directory
* So the tree project is built "on demand":
* First the tree is built from the current directory and shows files and subdirs.
* > First level subdirs trees are built (i.e subdirs contents are not read)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment