VIEW::ReorderLayerData(): fix an issue that creates crash in Gerbview

Fixes #16558
https://gitlab.com/kicad/code/kicad/-/issues/16558
This commit is contained in:
jean-pierre charras 2024-01-09 15:10:45 +01:00
parent 8eb6123985
commit 9c05b61d7b
1 changed files with 2 additions and 1 deletions

View File

@ -683,7 +683,8 @@ void VIEW::ReorderLayerData( std::unordered_map<int, int> aReorderMap )
new_map[pair.second].id = pair.second;
}
m_layers = std::move( new_map );
// Transfer reordered data (using the copy assignment operator ):
m_layers = new_map;
for( VIEW_ITEM* item : *m_allItems )
{