7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-11 14:50:11 +00:00

PANEL_FP_EDITOR_FIELD_DEFAULTS: fix incorrect behavior.

One could not change the default layers for new fp texts

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20505
This commit is contained in:
jean-pierre charras 2025-03-30 11:09:27 +02:00
parent 906c24bc6d
commit 97e1c107c9

View File

@ -127,7 +127,8 @@ public:
long GetValueAsLong( int row, int col ) override { return m_items[row].m_Layer; }
void SetValueAsLong( int row, int col, long value ) override
{
if( col == 2 )
if( col == GetNumberCols() - 1 ) // only last column uses a long value
// (probably useless test)
m_items[row].m_Layer = static_cast<PCB_LAYER_ID>( value );
}