Commit 1393bcaf authored by Wayne Stambaugh's avatar Wayne Stambaugh

Save document file when creating new component library from component in...

Save document file when creating new component library from component in library editor. (fixes lp:1351952)
parent 3f66000b
...@@ -146,6 +146,24 @@ void LIB_EDIT_FRAME::OnExportPart( wxCommandEvent& event ) ...@@ -146,6 +146,24 @@ void LIB_EDIT_FRAME::OnExportPart( wxCommandEvent& event )
return; 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 ) if( result )
m_lastLibExportPath = fn.GetPath(); m_lastLibExportPath = fn.GetPath();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment