Browse Source

Release file before re-loading it for Revert.

Fixes https://gitlab.com/kicad/code/kicad/issues/11481
7.0
Jeff Young 4 years ago
parent
commit
8a97a46e6b
  1. 1
      eeschema/tools/sch_editor_control.cpp
  2. 2
      pcbnew/files.cpp

1
eeschema/tools/sch_editor_control.cpp

@ -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;

2
pcbnew/files.cpp

@ -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…
Cancel
Save