Pcbnew, Eeschema: release lock file when these editors are closed (Until now, the lock file was released when the full Kicad application was closed, not when the editor was closed).

Should fix Bug #1360470  and Bug #1359502 .
This commit is contained in:
jean-pierre charras 2014-08-26 12:54:22 +02:00
parent b30e0dd869
commit d8c3ccb424
5 changed files with 18 additions and 1 deletions

View File

@ -308,6 +308,13 @@ void PGM_BASE::destroy()
m_html_ctrl = 0;
}
void PGM_BASE::ReleaseFile()
{
// Release the current file marked in use.
delete m_file_checker;
m_file_checker = 0;
}
void PGM_BASE::SetEditorName( const wxString& aFileName )
{

View File

@ -251,7 +251,7 @@ wxConfigBase* PROJECT::configCreate( const SEARCH_STACK& aSList,
if( wxFileName( cur_pro_fn ).IsFileReadable() )
{
// Note: currently, aGroupName is not used.
// Previoulsy, the version off aGroupName was tested, but it
// Previoulsy, the version of aGroupName was tested, but it
// was useless, and if the version is important,
// this is not the right place here, because configCreate does know anything
// about info stored in this config file.

View File

@ -417,6 +417,8 @@ SCH_EDIT_FRAME::~SCH_EDIT_FRAME()
m_undoItem = NULL;
g_RootSheet = NULL;
m_findReplaceData = NULL;
Pgm().ReleaseFile(); // Release the lock on root file
}
void SCH_EDIT_FRAME::SetRepeatItem( SCH_ITEM* aItem )

View File

@ -179,6 +179,12 @@ public:
*/
VTBL_ENTRY bool LockFile( const wxString& aFileName );
/**
* Function ReleaseFile
* Release the current file marked in use.
*/
VTBL_ENTRY void ReleaseFile();
/**
* Function App
* returns a bare naked wxApp, which may come from wxPython, SINGLE_TOP, or kicad.exe.

View File

@ -486,6 +486,8 @@ PCB_EDIT_FRAME::~PCB_EDIT_FRAME()
m_Macros[i].m_Record.clear();
delete m_drc;
Pgm().ReleaseFile(); // Release the lock on PCB file
}