Browse Source

Formatting.

6.0.7
Jeff Young 4 years ago
parent
commit
5f5ee7335d
  1. 5
      eeschema/files-io.cpp
  2. 5
      eeschema/sch_edit_frame.cpp
  3. 5
      eeschema/sim/sim_plot_frame.cpp
  4. 6
      eeschema/symbol_editor/symbol_edit_frame.h
  5. 8
      eeschema/symbol_editor/symbol_editor.cpp
  6. 10
      pagelayout_editor/files.cpp
  7. 5
      pcbnew/files.cpp

5
eeschema/files-io.cpp

@ -1242,7 +1242,10 @@ bool SCH_EDIT_FRAME::AskToSaveChanges()
{
if( !HandleUnsavedChanges( this, _( "The current schematic has been modified. "
"Save changes?" ),
[&]()->bool { return SaveProject(); } ) )
[&]() -> bool
{
return SaveProject();
} ) )
{
return false;
}

5
eeschema/sch_edit_frame.cpp

@ -654,7 +654,10 @@ bool SCH_EDIT_FRAME::canCloseWindow( wxCloseEvent& aEvent )
wxString msg = _( "Save changes to '%s' before closing?" );
if( !HandleUnsavedChanges( this, wxString::Format( msg, fileName.GetFullName() ),
[&]()->bool { return SaveProject(); } ) )
[&]() -> bool
{
return SaveProject();
} ) )
{
return false;
}

5
eeschema/sim/sim_plot_frame.cpp

@ -1598,12 +1598,13 @@ bool SIM_PLOT_FRAME::canCloseWindow( wxCloseEvent& aEvent )
filename.SetFullName( Prj().GetProjectName() + wxT( ".wbk" ) );
}
wxString fullFilename = filename.GetFullName();
wxString msg = _( "Save changes to '%s' before closing?" );
return HandleUnsavedChanges( this, wxString::Format( msg, filename.GetFullName() ),
return HandleUnsavedChanges( this, wxString::Format( msg, fullFilename ),
[&]() -> bool
{
return saveWorkbook( Prj().AbsolutePath( filename.GetFullName() ) );
return saveWorkbook( Prj().AbsolutePath( fullFilename ) );
} );
}

6
eeschema/symbol_editor/symbol_edit_frame.h

@ -544,11 +544,7 @@ private:
///< Flag if the symbol being edited was loaded directly from a schematic.
bool m_isSymbolFromSchematic;
/**
* The reference of the symbol.
*
* @note This is only valid when the current symbol was loaded from the schematic.
*/
///< RefDes of the symbol (only valid if symbol was loaded from schematic)
wxString m_reference;
// True to force DeMorgan/normal tools selection enabled.

8
eeschema/symbol_editor/symbol_editor.cpp

@ -259,9 +259,11 @@ bool SYMBOL_EDIT_FRAME::LoadSymbol( const LIB_ID& aLibId, int aUnit, int aConver
if( GetScreen()->IsContentModified() && GetCurSymbol() )
{
if( !HandleUnsavedChanges( this, _( "The current symbol has been modified. "
"Save changes?" ),
[&]()->bool { return saveCurrentSymbol(); } ) )
if( !HandleUnsavedChanges( this, _( "The current symbol has been modified. Save changes?" ),
[&]() -> bool
{
return saveCurrentSymbol();
} ) )
{
return false;
}

10
pagelayout_editor/files.cpp

@ -60,7 +60,10 @@ void PL_EDITOR_FRAME::OnFileHistory( wxCommandEvent& event )
{
if( !HandleUnsavedChanges( this, _( "The current drawing sheet has been modified. "
"Save changes?" ),
[&]()->bool { return saveCurrentPageLayout(); } ) )
[&]() -> bool
{
return saveCurrentPageLayout();
} ) )
{
return;
}
@ -101,7 +104,10 @@ void PL_EDITOR_FRAME::Files_io( wxCommandEvent& event )
{
if( !HandleUnsavedChanges( this, _( "The current drawing sheet has been modified. "
"Save changes?" ),
[&]()->bool { return saveCurrentPageLayout(); } ) )
[&]() -> bool
{
return saveCurrentPageLayout();
} ) )
{
return;
}

5
pcbnew/files.cpp

@ -586,7 +586,10 @@ bool PCB_EDIT_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, in
if( IsContentModified() )
{
if( !HandleUnsavedChanges( this, _( "The current PCB has been modified. Save changes?" ),
[&]()->bool { return SavePcbFile( GetBoard()->GetFileName() ); } ) )
[&]() -> bool
{
return SavePcbFile( GetBoard()->GetFileName() );
} ) )
{
return false;
}

Loading…
Cancel
Save