Update schema versions so we can patch bad data from earlier bug.

Fixes https://gitlab.com/kicad/code/kicad/issues/12180
This commit is contained in:
Jeff Young
2022-08-15 23:48:38 +01:00
parent e015f5b086
commit a3dc38cb32
3 changed files with 33 additions and 10 deletions
+15 -1
View File
@@ -43,7 +43,7 @@
///! Update the schema version whenever a migration is required
const int pcbnewSchemaVersion = 2;
const int pcbnewSchemaVersion = 3;
PCBNEW_SETTINGS::PCBNEW_SETTINGS()
@@ -578,6 +578,20 @@ PCBNEW_SETTINGS::PCBNEW_SETTINGS()
return true;
} );
registerMigration( 2, 3,
[&]() -> bool
{
// We used to have a bug on GTK which would set the lib tree column width way
// too narrow.
if( OPT<int> optval = Get<int>( "lib_tree.column_width" ) )
{
if( optval < 150 )
Set( "lib_tree.column_width", 300 );
}
return true;
} );
}