Release file before re-loading it for Revert.
Fixes https://gitlab.com/kicad/code/kicad/issues/11481
This commit is contained in:
parent
e7f5deedb8
commit
8a97a46e6b
|
@ -146,6 +146,7 @@ int SCH_EDITOR_CONTROL::Revert( const TOOL_EVENT& aEvent )
|
|||
for( SCH_SCREEN* screen = screenList.GetFirst(); screen; screen = screenList.GetNext() )
|
||||
screen->SetContentModified( false ); // do not prompt the user for changes
|
||||
|
||||
m_frame->ReleaseFile();
|
||||
m_frame->OpenProjectFiles( std::vector<wxString>( 1, schematic.GetFileName() ) );
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -380,6 +380,8 @@ bool PCB_EDIT_FRAME::Files_io_from_id( int id )
|
|||
|
||||
GetScreen()->SetContentModified( false ); // do not prompt the user for changes
|
||||
|
||||
ReleaseFile();
|
||||
|
||||
return OpenProjectFiles( std::vector<wxString>( 1, fn.GetFullPath() ) );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue