Remove dead code.
This commit is contained in:
parent
3b04fc7dca
commit
da11574a19
|
@ -270,8 +270,3 @@ void PCB_BASE_EDIT_FRAME::handleActivateEvent( wxActivateEvent& aEvent )
|
|||
}
|
||||
|
||||
|
||||
void PCB_BASE_EDIT_FRAME::OnLayerAlphaChanged()
|
||||
{
|
||||
if( m_appearancePanel )
|
||||
m_appearancePanel->OnLayerAlphaChanged();
|
||||
}
|
||||
|
|
|
@ -206,11 +206,6 @@ public:
|
|||
|
||||
APPEARANCE_CONTROLS* GetAppearancePanel() { return m_appearancePanel; }
|
||||
|
||||
/**
|
||||
* Notify the frame that the layer Alpha is being changed
|
||||
*/
|
||||
virtual void OnLayerAlphaChanged();
|
||||
|
||||
protected:
|
||||
/**
|
||||
* Prompts a user to select global or project library tables
|
||||
|
|
|
@ -455,8 +455,6 @@ int PCB_CONTROL::LayerAlphaInc( const TOOL_EVENT& aEvent )
|
|||
|
||||
if( IsCopperLayer( currentLayer ) )
|
||||
view->UpdateLayerColor( ZONE_LAYER_FOR( currentLayer ) );
|
||||
|
||||
static_cast<PCB_BASE_EDIT_FRAME*>( m_frame )->OnLayerAlphaChanged();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -485,8 +483,6 @@ int PCB_CONTROL::LayerAlphaDec( const TOOL_EVENT& aEvent )
|
|||
|
||||
if( IsCopperLayer( currentLayer ) )
|
||||
view->UpdateLayerColor( ZONE_LAYER_FOR( currentLayer ) );
|
||||
|
||||
static_cast<PCB_BASE_EDIT_FRAME*>( m_frame )->OnLayerAlphaChanged();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -1245,46 +1245,6 @@ GAL_SET APPEARANCE_CONTROLS::getVisibleObjects()
|
|||
}
|
||||
|
||||
|
||||
void APPEARANCE_CONTROLS::OnLayerAlphaChanged()
|
||||
{
|
||||
// TODO(JE) Is this even needed if the layer alphas are getting directly updated?
|
||||
// Maybe we just need the "down" arrow to indicate if the alpha is below 1
|
||||
|
||||
#if 0
|
||||
static constexpr double alphaEpsilon = 0.04;
|
||||
|
||||
PCB_LAYER_ID current = m_frame->GetActiveLayer();
|
||||
COLOR_SETTINGS* theme = m_frame->GetColorSettings();
|
||||
KIGFX::PCB_PAINTER* painter =
|
||||
static_cast<KIGFX::PCB_PAINTER*>( m_frame->GetCanvas()->GetView()->GetPainter() );
|
||||
KIGFX::PCB_RENDER_SETTINGS* rs = painter->GetSettings();
|
||||
|
||||
for( APPEARANCE_SETTING& setting : m_layerSettings )
|
||||
{
|
||||
if( !setting.ctl_indicator )
|
||||
continue;
|
||||
|
||||
COLOR4D layerColor = theme->GetColor( setting.id );
|
||||
COLOR4D screenColor = rs->GetLayerColor( setting.id );
|
||||
|
||||
if( std::abs( screenColor.a - layerColor.a ) > alphaEpsilon )
|
||||
{
|
||||
if( screenColor.a < layerColor.a )
|
||||
setting.ctl_indicator->SetIndicatorState( ROW_ICON_PROVIDER::STATE::DOWN );
|
||||
else
|
||||
setting.ctl_indicator->SetIndicatorState( ROW_ICON_PROVIDER::STATE::UP );
|
||||
}
|
||||
else
|
||||
{
|
||||
setting.ctl_indicator->SetIndicatorState( setting.id == current ?
|
||||
ROW_ICON_PROVIDER::STATE::ON :
|
||||
ROW_ICON_PROVIDER::STATE::OFF );
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void APPEARANCE_CONTROLS::UpdateDisplayOptions()
|
||||
{
|
||||
const PCB_DISPLAY_OPTIONS& options = m_frame->GetDisplayOptions();
|
||||
|
|
|
@ -232,9 +232,6 @@ public:
|
|||
|
||||
void SetObjectVisible( GAL_LAYER_ID aLayer, bool isVisible = true );
|
||||
|
||||
///< Update the manual layer alpha overrides.
|
||||
void OnLayerAlphaChanged();
|
||||
|
||||
void UpdateDisplayOptions();
|
||||
|
||||
///< Return a list of the layer presets created by the user.
|
||||
|
|
Loading…
Reference in New Issue