Browse Source

Re-arrange visibility flags only.

Colors are owned by the slot, not the layer objects.
newinvert
Jeff Young 2 years ago
parent
commit
f58c0c370c
  1. 11
      gerbview/gerbview_frame.cpp

11
gerbview/gerbview_frame.cpp

@ -546,21 +546,14 @@ void GERBVIEW_FRAME::SortLayersByX2Attributes()
void GERBVIEW_FRAME::RemapLayers( const std::unordered_map<int, int>& remapping )
{
std::unordered_map<int, COLOR4D> oldColors;
std::unordered_map<int, bool> oldVisibility;
LSET newVisibility;
std::unordered_map<int, bool> oldVisibility;
LSET newVisibility;
for( const std::pair<const int, int>& entry : remapping )
{
oldColors[ entry.second ] = GetLayerColor( GERBER_DRAW_LAYER( entry.second ) );
oldVisibility[ entry.second ] = IsLayerVisible( entry.second );
}
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 ] );
}
std::unordered_map<int, int> view_remapping;

Loading…
Cancel
Save