Loading pcbnew/files.cpp +7 −0 Original line number Original line Diff line number Diff line Loading @@ -241,7 +241,14 @@ the changes?" ) ) ) fileName.SetExt( pi->GetFileExtension() ); fileName.SetExt( pi->GetFileExtension() ); if( !aAppend ) if( !aAppend ) { if( !wxGetApp().LockFile( fileName.GetFullPath() ) ) { DisplayError( this, _( "This file is already open." ) ); return false; } Clear_Pcb( false ); // pass false since we prompted above for a modified board Clear_Pcb( false ); // pass false since we prompted above for a modified board } CheckForAutoSaveFile( fileName, fileName.GetExt() ); CheckForAutoSaveFile( fileName, fileName.GetExt() ); Loading pcbnew/pcbnew.cpp +18 −12 Original line number Original line Diff line number Diff line Loading @@ -117,16 +117,6 @@ bool EDA_APP::OnInit() InitEDA_Appl( wxT( "Pcbnew" ), APP_PCBNEW_T ); InitEDA_Appl( wxT( "Pcbnew" ), APP_PCBNEW_T ); if( m_Checker && m_Checker->IsAnotherRunning() ) { if( !IsOK( NULL, _( "Pcbnew is already running, Continue?" ) ) ) return false; } // read current setup and reopen last directory if no filename to open in command line bool reopenLastUsedDirectory = argc == 1; GetSettings( reopenLastUsedDirectory ); if( argc > 1 ) if( argc > 1 ) { { fn = argv[1]; fn = argv[1]; Loading @@ -140,9 +130,25 @@ Changing extension to .%s." ), GetChars( fn.GetFullPath() ), wxMessageBox( msg ); wxMessageBox( msg ); } } if( !wxGetApp().LockFile( fn.GetFullPath() ) ) { DisplayError( NULL, _( "This file is already open." ) ); return false; } } if( m_Checker && m_Checker->IsAnotherRunning() ) { if( !IsOK( NULL, _( "Pcbnew is already running, Continue?" ) ) ) return false; } // read current setup and reopen last directory if no filename to open in command line bool reopenLastUsedDirectory = argc == 1; GetSettings( reopenLastUsedDirectory ); if( fn.IsOk() && fn.DirExists() ) if( fn.IsOk() && fn.DirExists() ) wxSetWorkingDirectory( fn.GetPath() ); wxSetWorkingDirectory( fn.GetPath() ); } g_DrawBgColor = BLACK; g_DrawBgColor = BLACK; Loading Loading
pcbnew/files.cpp +7 −0 Original line number Original line Diff line number Diff line Loading @@ -241,7 +241,14 @@ the changes?" ) ) ) fileName.SetExt( pi->GetFileExtension() ); fileName.SetExt( pi->GetFileExtension() ); if( !aAppend ) if( !aAppend ) { if( !wxGetApp().LockFile( fileName.GetFullPath() ) ) { DisplayError( this, _( "This file is already open." ) ); return false; } Clear_Pcb( false ); // pass false since we prompted above for a modified board Clear_Pcb( false ); // pass false since we prompted above for a modified board } CheckForAutoSaveFile( fileName, fileName.GetExt() ); CheckForAutoSaveFile( fileName, fileName.GetExt() ); Loading
pcbnew/pcbnew.cpp +18 −12 Original line number Original line Diff line number Diff line Loading @@ -117,16 +117,6 @@ bool EDA_APP::OnInit() InitEDA_Appl( wxT( "Pcbnew" ), APP_PCBNEW_T ); InitEDA_Appl( wxT( "Pcbnew" ), APP_PCBNEW_T ); if( m_Checker && m_Checker->IsAnotherRunning() ) { if( !IsOK( NULL, _( "Pcbnew is already running, Continue?" ) ) ) return false; } // read current setup and reopen last directory if no filename to open in command line bool reopenLastUsedDirectory = argc == 1; GetSettings( reopenLastUsedDirectory ); if( argc > 1 ) if( argc > 1 ) { { fn = argv[1]; fn = argv[1]; Loading @@ -140,9 +130,25 @@ Changing extension to .%s." ), GetChars( fn.GetFullPath() ), wxMessageBox( msg ); wxMessageBox( msg ); } } if( !wxGetApp().LockFile( fn.GetFullPath() ) ) { DisplayError( NULL, _( "This file is already open." ) ); return false; } } if( m_Checker && m_Checker->IsAnotherRunning() ) { if( !IsOK( NULL, _( "Pcbnew is already running, Continue?" ) ) ) return false; } // read current setup and reopen last directory if no filename to open in command line bool reopenLastUsedDirectory = argc == 1; GetSettings( reopenLastUsedDirectory ); if( fn.IsOk() && fn.DirExists() ) if( fn.IsOk() && fn.DirExists() ) wxSetWorkingDirectory( fn.GetPath() ); wxSetWorkingDirectory( fn.GetPath() ); } g_DrawBgColor = BLACK; g_DrawBgColor = BLACK; Loading