Browse Source

Pcbnew: release the lock file if a board was loaded, and when clearing the board currently edited. When the board is cleared, the previous loaded board is no longer in edit.

pull/14/head
jean-pierre charras 7 years ago
parent
commit
b62f94f5c2
  1. 2
      pcbnew/files.cpp
  2. 3
      pcbnew/initpcb.cpp

2
pcbnew/files.cpp

@ -418,7 +418,7 @@ bool PCB_EDIT_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, in
}
// Release the lock file, until the new file is actually loaded
m_file_checker.reset( nullptr );
ReleaseFile();
wxFileName pro = fullFileName;
pro.SetExt( ProjectFileExtension );

3
pcbnew/initpcb.cpp

@ -48,6 +48,9 @@ bool PCB_EDIT_FRAME::Clear_Pcb( bool aQuery )
return false;
}
// Release the lock file, if exists
ReleaseFile();
// Clear undo and redo lists because we want a full deletion
GetScreen()->ClearUndoRedoList();
GetScreen()->ClrModify();

Loading…
Cancel
Save