Loading pcbnew/files.cpp +17 −11 Original line number Original line Diff line number Diff line Loading @@ -253,13 +253,19 @@ bool WinEDA_PcbFrame::SavePcbFile( const wxString& FileName ) /* Sauvegarde du fichier PCB en format ASCII /* Sauvegarde du fichier PCB en format ASCII */ */ { { wxString old_name, FullFileName, msg; wxString old_name; wxString FullFileName; wxString upperTxt; wxString lowerTxt; wxString msg; bool saveok = TRUE; bool saveok = TRUE; FILE* dest; FILE* dest; if( FileName == wxEmptyString ) if( FileName == wxEmptyString ) { { msg = wxT( "*" ) + PcbExtBuffer; msg = wxT( "*" ) + PcbExtBuffer; FullFileName = EDA_FileSelector( _( "Save board files:" ), FullFileName = EDA_FileSelector( _( "Save board files:" ), wxEmptyString, /* Chemin par defaut */ wxEmptyString, /* Chemin par defaut */ GetScreen()->m_FileName, /* nom fichier par defaut */ GetScreen()->m_FileName, /* nom fichier par defaut */ Loading @@ -271,6 +277,7 @@ bool WinEDA_PcbFrame::SavePcbFile( const wxString& FileName ) ); ); if( FullFileName == wxEmptyString ) if( FullFileName == wxEmptyString ) return FALSE; return FALSE; GetScreen()->m_FileName = FullFileName; GetScreen()->m_FileName = FullFileName; } } else else Loading Loading @@ -321,9 +328,7 @@ bool WinEDA_PcbFrame::SavePcbFile( const wxString& FileName ) GetScreen()->m_FileName = FullFileName; GetScreen()->m_FileName = FullFileName; SetTitle( GetScreen()->m_FileName ); SetTitle( GetScreen()->m_FileName ); SavePcbFormatAscii( dest ); SavePcbFormatAscii( dest ); fclose( dest ); fclose( dest ); } } Loading @@ -332,18 +337,19 @@ bool WinEDA_PcbFrame::SavePcbFile( const wxString& FileName ) if( saveok ) if( saveok ) { { msg = _( "Backup file: " ) + old_name; upperTxt = _( "Backup file: " ) + old_name; Affiche_1_Parametre( this, 1, msg, wxEmptyString, CYAN ); } } if( dest ) if( dest ) msg = _( "Write Board file: " ); lowerTxt = _( "Wrote board file: " ); else else msg = _( "Failed to create " ); lowerTxt = _( "Failed to create " ); msg += FullFileName; lowerTxt += FullFileName; Affiche_1_Parametre( this, 1, upperTxt, lowerTxt, CYAN ); Affiche_1_Parametre( this, 1, wxEmptyString, msg, CYAN ); g_SaveTime = time( NULL ); /* Reset delai pour sauvegarde automatique */ g_SaveTime = time( NULL ); /* Reset delai pour sauvegarde automatique */ GetScreen()->ClrModify(); GetScreen()->ClrModify(); return TRUE; return TRUE; } } Loading
pcbnew/files.cpp +17 −11 Original line number Original line Diff line number Diff line Loading @@ -253,13 +253,19 @@ bool WinEDA_PcbFrame::SavePcbFile( const wxString& FileName ) /* Sauvegarde du fichier PCB en format ASCII /* Sauvegarde du fichier PCB en format ASCII */ */ { { wxString old_name, FullFileName, msg; wxString old_name; wxString FullFileName; wxString upperTxt; wxString lowerTxt; wxString msg; bool saveok = TRUE; bool saveok = TRUE; FILE* dest; FILE* dest; if( FileName == wxEmptyString ) if( FileName == wxEmptyString ) { { msg = wxT( "*" ) + PcbExtBuffer; msg = wxT( "*" ) + PcbExtBuffer; FullFileName = EDA_FileSelector( _( "Save board files:" ), FullFileName = EDA_FileSelector( _( "Save board files:" ), wxEmptyString, /* Chemin par defaut */ wxEmptyString, /* Chemin par defaut */ GetScreen()->m_FileName, /* nom fichier par defaut */ GetScreen()->m_FileName, /* nom fichier par defaut */ Loading @@ -271,6 +277,7 @@ bool WinEDA_PcbFrame::SavePcbFile( const wxString& FileName ) ); ); if( FullFileName == wxEmptyString ) if( FullFileName == wxEmptyString ) return FALSE; return FALSE; GetScreen()->m_FileName = FullFileName; GetScreen()->m_FileName = FullFileName; } } else else Loading Loading @@ -321,9 +328,7 @@ bool WinEDA_PcbFrame::SavePcbFile( const wxString& FileName ) GetScreen()->m_FileName = FullFileName; GetScreen()->m_FileName = FullFileName; SetTitle( GetScreen()->m_FileName ); SetTitle( GetScreen()->m_FileName ); SavePcbFormatAscii( dest ); SavePcbFormatAscii( dest ); fclose( dest ); fclose( dest ); } } Loading @@ -332,18 +337,19 @@ bool WinEDA_PcbFrame::SavePcbFile( const wxString& FileName ) if( saveok ) if( saveok ) { { msg = _( "Backup file: " ) + old_name; upperTxt = _( "Backup file: " ) + old_name; Affiche_1_Parametre( this, 1, msg, wxEmptyString, CYAN ); } } if( dest ) if( dest ) msg = _( "Write Board file: " ); lowerTxt = _( "Wrote board file: " ); else else msg = _( "Failed to create " ); lowerTxt = _( "Failed to create " ); msg += FullFileName; lowerTxt += FullFileName; Affiche_1_Parametre( this, 1, upperTxt, lowerTxt, CYAN ); Affiche_1_Parametre( this, 1, wxEmptyString, msg, CYAN ); g_SaveTime = time( NULL ); /* Reset delai pour sauvegarde automatique */ g_SaveTime = time( NULL ); /* Reset delai pour sauvegarde automatique */ GetScreen()->ClrModify(); GetScreen()->ClrModify(); return TRUE; return TRUE; } }