Assign stack pointer to lib table
When creating new lib table rows, the pointer becomes managed by the new table through the boost::ptr_vector. The row is non-copyable, however, so we lose the reference as soon as it goes out of scope. Creating a clone provides a new pointer that is moved into the table on creation. Fixes: lp:1792456 * https://bugs.launchpad.net/kicad/+bug/1792456
This commit is contained in:
parent
b461fc44ef
commit
c08736e245
|
@ -126,7 +126,7 @@ protected:
|
||||||
tbl->AppendRows( tmp_tbl.GetCount() - tbl->GetNumberRows() );
|
tbl->AppendRows( tmp_tbl.GetCount() - tbl->GetNumberRows() );
|
||||||
|
|
||||||
for( int i = 0; i < tmp_tbl.GetCount(); ++i )
|
for( int i = 0; i < tmp_tbl.GetCount(); ++i )
|
||||||
tbl->rows.replace( i, tmp_tbl.At( i ) );
|
tbl->rows.replace( i, tmp_tbl.At( i )->clone() );
|
||||||
}
|
}
|
||||||
|
|
||||||
m_grid->AutoSizeColumns( false );
|
m_grid->AutoSizeColumns( false );
|
||||||
|
|
|
@ -249,7 +249,7 @@ protected:
|
||||||
tbl->AppendRows( tmp_tbl.GetCount() - tbl->GetNumberRows() );
|
tbl->AppendRows( tmp_tbl.GetCount() - tbl->GetNumberRows() );
|
||||||
|
|
||||||
for( int i = 0; i < tmp_tbl.GetCount(); ++i )
|
for( int i = 0; i < tmp_tbl.GetCount(); ++i )
|
||||||
tbl->rows.replace( i, tmp_tbl.At( i ) );
|
tbl->rows.replace( i, tmp_tbl.At( i )->clone() );
|
||||||
}
|
}
|
||||||
|
|
||||||
m_grid->AutoSizeColumns( false );
|
m_grid->AutoSizeColumns( false );
|
||||||
|
|
Loading…
Reference in New Issue