← Back to team overview

kicad-developers team mailing list archive

First append board fix

 

--=-dLfLyFTM60q9UIwnD+wY Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Hi,

Here's a patch for files.cpp in pcbnew.

This fixes the problem with "append board" changing the name of the
board current board to "noname.brd"

Let me know if something doesn't work or if there is a reason this
should not be done.

Thanks,
Moses

 --=-dLfLyFTM60q9UIwnD+wY Content-Disposition: attachment; filename=files.patch
Content-Type: text/x-patch; name=files.patch; charset=UTF-8
Content-Transfer-Encoding: 7bit

149,150c149,150
< GetScreen()->m_FileName = wxEmptyString;
< GetScreen()->SetModify();
---
> //GetScreen()->m_FileName = wxEmptyString;
> //GetScreen()->SetModify();
176a177
> {
178,179c179,180
< 
< GetScreen()->m_FileName = fileName;
---
> GetScreen()->m_FileName = fileName;
> }
184c185,186
< source = wxFopen( GetScreen()->m_FileName, wxT( "rt" ) );
---
> //source = wxFopen( GetScreen()->m_FileName, wxT( "rt" ) );
> source = wxFopen( fileName, wxT( "rt" ) );
187c189,190
< msg.Printf( _( "File <%s> not found" ), GetScreen()->m_FileName.GetData() );
---
> //msg.Printf( _( "File <%s> not found" ), GetScreen()->m_FileName.GetData() );
> msg.Printf( _( "File <%s> not found" ), fileName.GetData() );
213,214c216,220
< SetTitle( GetScreen()->m_FileName );
< SetLastProject( GetScreen()->m_FileName );
---
> if( !Append )
> {
> SetTitle( GetScreen()->m_FileName );
> SetLastProject( GetScreen()->m_FileName );
> }
217c223,224
< wxSetWorkingDirectory( wxPathOnly( GetScreen()->m_FileName ) );
---
> //wxSetWorkingDirectory( wxPathOnly( GetScreen()->m_FileName ) );
> wxSetWorkingDirectory( wxPathOnly( fileName ) );
240,241c247,248
< GetScreen()->m_FileName.Printf( wxT( "%s%cnoname%s" ),
< wxGetCwd().GetData(), DIR_SEP, PcbExtBuffer.GetData() );
---
> //GetScreen()->m_FileName.Printf( wxT( "%s%cnoname%s" ),
> // wxGetCwd().GetData(), DIR_SEP, PcbExtBuffer.GetData() );
 --=-dLfLyFTM60q9UIwnD+wY-- 




Follow ups