Revert "Gerber viewer: move layer colors with layers"
This reverts commit 75ed6b3ce7
.
It was a not really tested feature: It has a serious side effect: the color
settings are modified each time a .gbrjob is loaded (or loaded layers are sorted)
This commit is contained in:
parent
bde2d388f1
commit
babffb230d
|
@ -535,8 +535,6 @@ void GERBVIEW_FRAME::SortLayersByX2Attributes()
|
||||||
|
|
||||||
void GERBVIEW_FRAME::RemapLayers( std::unordered_map<int, int> remapping )
|
void GERBVIEW_FRAME::RemapLayers( std::unordered_map<int, int> remapping )
|
||||||
{
|
{
|
||||||
std::unordered_map<int, COLOR4D> newColors;
|
|
||||||
|
|
||||||
ReFillLayerWidget();
|
ReFillLayerWidget();
|
||||||
syncLayerBox( true );
|
syncLayerBox( true );
|
||||||
|
|
||||||
|
@ -546,17 +544,9 @@ void GERBVIEW_FRAME::RemapLayers( std::unordered_map<int, int> remapping )
|
||||||
{
|
{
|
||||||
view_remapping[ GERBER_DRAW_LAYER( entry.first ) ] = GERBER_DRAW_LAYER( entry.second );
|
view_remapping[ GERBER_DRAW_LAYER( entry.first ) ] = GERBER_DRAW_LAYER( entry.second );
|
||||||
view_remapping[ GERBER_DCODE_LAYER( entry.first ) ] = GERBER_DCODE_LAYER( entry.second );
|
view_remapping[ GERBER_DCODE_LAYER( entry.first ) ] = GERBER_DCODE_LAYER( entry.second );
|
||||||
newColors[entry.second] = GetLayerColor( GERBER_DRAW_LAYER( entry.first ) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GetCanvas()->GetView()->ReorderLayerData( view_remapping );
|
GetCanvas()->GetView()->ReorderLayerData( view_remapping );
|
||||||
|
|
||||||
for( const std::pair<const int, COLOR4D>& entry : newColors )
|
|
||||||
{
|
|
||||||
m_LayersManager->SetLayerColor( entry.first, entry.second );
|
|
||||||
SetLayerColor( GERBER_DRAW_LAYER( entry.first ), entry.second );
|
|
||||||
}
|
|
||||||
|
|
||||||
GetCanvas()->Refresh();
|
GetCanvas()->Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue