Save document file when creating new component library from component in library editor. (fixes lp:1351952)
This commit is contained in:
parent
3f66000bf3
commit
1393bcafc0
|
@ -146,6 +146,24 @@ void LIB_EDIT_FRAME::OnExportPart( wxCommandEvent& event )
|
|||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
wxFileName docFileName = fn;
|
||||
|
||||
docFileName.SetExt( DOC_EXT );
|
||||
|
||||
FILE_OUTPUTFORMATTER formatter( docFileName.GetFullPath() );
|
||||
|
||||
result = temp_lib.get()->SaveDocs( formatter );
|
||||
}
|
||||
catch( ... /* IO_ERROR ioe */ )
|
||||
{
|
||||
fn.MakeAbsolute();
|
||||
msg = wxT( "Failed to create component library document file " ) + fn.GetFullPath();
|
||||
DisplayError( this, msg );
|
||||
return;
|
||||
}
|
||||
|
||||
if( result )
|
||||
m_lastLibExportPath = fn.GetPath();
|
||||
|
||||
|
|
Loading…
Reference in New Issue