Pcbnew: fix issue in dialog_fp_lib_table: when the only changes were the plugin name, changes were not taken in account.
Because the FP_LIB_TABLE::operator == was incorrect
This commit is contained in:
parent
22a8df69c4
commit
e3d69b619f
|
@ -186,6 +186,23 @@ void FP_LIB_TABLE::Parse( LIB_TABLE_LEXER* in )
|
|||
}
|
||||
|
||||
|
||||
bool FP_LIB_TABLE::operator==( const FP_LIB_TABLE& aFpTable ) const
|
||||
{
|
||||
if( rows.size() == aFpTable.rows.size() )
|
||||
{
|
||||
for( unsigned i = 0; i < rows.size(); ++i )
|
||||
{
|
||||
if( (FP_LIB_TABLE_ROW&)rows[i] != (FP_LIB_TABLE_ROW&)aFpTable.rows[i] )
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
void FP_LIB_TABLE::Format( OUTPUTFORMATTER* aOutput, int aIndentLevel ) const
|
||||
{
|
||||
aOutput->Print( aIndentLevel, "(fp_lib_table\n" );
|
||||
|
|
|
@ -122,6 +122,11 @@ public:
|
|||
*/
|
||||
FP_LIB_TABLE( FP_LIB_TABLE* aFallBackTable = NULL );
|
||||
|
||||
|
||||
bool operator==( const FP_LIB_TABLE& aFpTable ) const;
|
||||
|
||||
bool operator!=( const FP_LIB_TABLE& r ) const { return !( *this == r ); }
|
||||
|
||||
/**
|
||||
* Function FindRow
|
||||
*
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
|
||||
* Copyright (C) 2013 CERN
|
||||
* Copyright (C) 2012-2017 KiCad Developers, see change_log.txt for contributors.
|
||||
* Copyright (C) 2012-2017 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
|
Loading…
Reference in New Issue