mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-15 02:33:15 +02:00
Re-arrange visibility flags only.
Colors are owned by the slot, not the layer objects.
This commit is contained in:
parent
40ef850bd3
commit
f58c0c370c
@ -546,21 +546,14 @@ void GERBVIEW_FRAME::SortLayersByX2Attributes()
|
|||||||
|
|
||||||
void GERBVIEW_FRAME::RemapLayers( const std::unordered_map<int, int>& remapping )
|
void GERBVIEW_FRAME::RemapLayers( const std::unordered_map<int, int>& remapping )
|
||||||
{
|
{
|
||||||
std::unordered_map<int, COLOR4D> oldColors;
|
std::unordered_map<int, bool> oldVisibility;
|
||||||
std::unordered_map<int, bool> oldVisibility;
|
LSET newVisibility;
|
||||||
LSET newVisibility;
|
|
||||||
|
|
||||||
for( const std::pair<const int, int>& entry : remapping )
|
for( const std::pair<const int, int>& entry : remapping )
|
||||||
{
|
|
||||||
oldColors[ entry.second ] = GetLayerColor( GERBER_DRAW_LAYER( entry.second ) );
|
|
||||||
oldVisibility[ entry.second ] = IsLayerVisible( entry.second );
|
oldVisibility[ entry.second ] = IsLayerVisible( entry.second );
|
||||||
}
|
|
||||||
|
|
||||||
for( const std::pair<const int, int>& entry : remapping )
|
for( const std::pair<const int, int>& entry : remapping )
|
||||||
{
|
|
||||||
SetLayerColor( GERBER_DRAW_LAYER( entry.first ), oldColors[ entry.second ] );
|
|
||||||
newVisibility.set( entry.first, oldVisibility[ entry.second ] );
|
newVisibility.set( entry.first, oldVisibility[ entry.second ] );
|
||||||
}
|
|
||||||
|
|
||||||
std::unordered_map<int, int> view_remapping;
|
std::unordered_map<int, int> view_remapping;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user