Browse Source

Handle hidden attribute in fp-lib-table

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13689
7.0
Jon Evans 3 years ago
parent
commit
d04cda35c5
  1. 6
      common/fp_lib_table.cpp
  2. 4
      pcbnew/dialogs/panel_fp_lib_table.cpp

6
common/fp_lib_table.cpp

@ -184,6 +184,12 @@ void FP_LIB_TABLE::Parse( LIB_TABLE_LEXER* in )
row->SetEnabled( false );
break;
case T_hidden:
// Hiding footprint libraries is not yet supported. Unclear what path can set this
// attribute, but clear it on load.
row->SetVisible();
break;
default:
in->Unexpected( tok );
}

4
pcbnew/dialogs/panel_fp_lib_table.cpp

@ -581,6 +581,10 @@ bool PANEL_FP_LIB_TABLE::verifyTables()
// set the trimmed values back into the table so they get saved to disk.
model->SetValue( r, COL_NICKNAME, nick );
model->SetValue( r, COL_URI, uri );
// Make sure to not save a hidden flag
model->SetValue( r, COL_VISIBLE, wxS( "1" ) );
++r; // this row was OK.
}
}

Loading…
Cancel
Save