Merge PCB_LAYER_WIDGET::SyncRenderStates into ReFillRender
This commit is contained in:
parent
bbad8dc9af
commit
a83669ab19
|
@ -952,7 +952,7 @@ void PCB_EDIT_FRAME::syncLayerWidgetLayer()
|
||||||
|
|
||||||
void PCB_EDIT_FRAME::syncRenderStates()
|
void PCB_EDIT_FRAME::syncRenderStates()
|
||||||
{
|
{
|
||||||
m_Layers->SyncRenderStates();
|
m_Layers->ReFillRender();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -409,42 +409,25 @@ void PCB_LAYER_WIDGET::ReFillRender()
|
||||||
if( renderRow.id == LAYER_VIA_BBLIND && !settings.m_BlindBuriedViaAllowed )
|
if( renderRow.id == LAYER_VIA_BBLIND && !settings.m_BlindBuriedViaAllowed )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
renderRow.tooltip = wxGetTranslation( s_render_rows[row].tooltip );
|
if( !renderRow.spacer )
|
||||||
renderRow.rowName = wxGetTranslation( s_render_rows[row].rowName );
|
|
||||||
|
|
||||||
if( renderRow.color != COLOR4D::UNSPECIFIED ) // does this row show a color?
|
|
||||||
{
|
{
|
||||||
// this window frame must have an established BOARD, i.e. after SetBoard()
|
renderRow.tooltip = wxGetTranslation( s_render_rows[row].tooltip );
|
||||||
renderRow.color = myframe->Settings().Colors().GetItemColor( static_cast<GAL_LAYER_ID>( renderRow.id ) );
|
renderRow.rowName = wxGetTranslation( s_render_rows[row].rowName );
|
||||||
|
|
||||||
|
if( renderRow.color != COLOR4D::UNSPECIFIED ) // does this row show a color?
|
||||||
|
{
|
||||||
|
// this window frame must have an established BOARD, i.e. after SetBoard()
|
||||||
|
renderRow.color = myframe->Settings().Colors().GetItemColor( static_cast<GAL_LAYER_ID>( renderRow.id ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
renderRow.state = board->IsElementVisible( static_cast<GAL_LAYER_ID>( renderRow.id ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
renderRow.state = board->IsElementVisible( static_cast<GAL_LAYER_ID>( renderRow.id ) );
|
|
||||||
|
|
||||||
AppendRenderRow( renderRow );
|
AppendRenderRow( renderRow );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void PCB_LAYER_WIDGET::SyncRenderStates()
|
|
||||||
{
|
|
||||||
BOARD* board = myframe->GetBoard();
|
|
||||||
|
|
||||||
for( unsigned row=0; row<DIM(s_render_rows); ++row )
|
|
||||||
{
|
|
||||||
int rowId = s_render_rows[row].id;
|
|
||||||
|
|
||||||
if( m_fp_editor_mode && !isAllowedInFpMode( rowId ) )
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if( s_render_rows[row].spacer )
|
|
||||||
continue;
|
|
||||||
|
|
||||||
// this does not fire a UI event
|
|
||||||
SetRenderState( rowId, board->IsElementVisible( static_cast<GAL_LAYER_ID>( rowId ) ) );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void PCB_LAYER_WIDGET::SyncLayerVisibilities()
|
void PCB_LAYER_WIDGET::SyncLayerVisibilities()
|
||||||
{
|
{
|
||||||
BOARD* board = myframe->GetBoard();
|
BOARD* board = myframe->GetBoard();
|
||||||
|
|
|
@ -65,13 +65,6 @@ public:
|
||||||
*/
|
*/
|
||||||
void ReFillRender();
|
void ReFillRender();
|
||||||
|
|
||||||
/**
|
|
||||||
* Function SyncRenderStates
|
|
||||||
* updates the checkboxes (checked or not) to be consistent with the current state
|
|
||||||
* of the visibility of the visible rendering elements.
|
|
||||||
*/
|
|
||||||
void SyncRenderStates();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function SyncLayerVisibilities
|
* Function SyncLayerVisibilities
|
||||||
* updates each "Layer" checkbox in this layer widget according
|
* updates each "Layer" checkbox in this layer widget according
|
||||||
|
|
Loading…
Reference in New Issue