Push pcbnew layer alpha change update into base frame
This code was shared between the footprint frame and pcb edit frame, so push it into the base edit frame. Also remove the dummy wxUpdateUIEvents that weren't actually being used.
This commit is contained in:
parent
3fd3be9843
commit
29cc16a4c4
|
@ -373,8 +373,6 @@ public:
|
|||
|
||||
void CommonSettingsChanged( bool aEnvVarsChanged, bool aTextVarsChanged ) override;
|
||||
|
||||
virtual void OnUpdateLayerAlpha( wxUpdateUIEvent& aEvent ) {}
|
||||
|
||||
/**
|
||||
* Display the current grid pane on the status bar.
|
||||
*/
|
||||
|
|
|
@ -901,12 +901,6 @@ void FOOTPRINT_EDIT_FRAME::OnDisplayOptionsChanged()
|
|||
}
|
||||
|
||||
|
||||
void FOOTPRINT_EDIT_FRAME::OnUpdateLayerAlpha( wxUpdateUIEvent & )
|
||||
{
|
||||
m_appearancePanel->OnLayerAlphaChanged();
|
||||
}
|
||||
|
||||
|
||||
void FOOTPRINT_EDIT_FRAME::InstallPreferences( PAGED_DIALOG* aParent,
|
||||
PANEL_HOTKEYS_EDITOR* aHotkeysPanel )
|
||||
{
|
||||
|
|
|
@ -248,9 +248,6 @@ public:
|
|||
///< @copydoc PCB_BASE_FRAME::SetActiveLayer()
|
||||
void SetActiveLayer( PCB_LAYER_ID aLayer ) override;
|
||||
|
||||
///< @copydoc PCB_BASE_FRAME::OnUpdateLayerAlpha()
|
||||
void OnUpdateLayerAlpha( wxUpdateUIEvent& aEvent ) override;
|
||||
|
||||
void OnDisplayOptionsChanged() override;
|
||||
|
||||
///< @copydoc EDA_DRAW_FRAME::UseGalCanvas()
|
||||
|
|
|
@ -223,6 +223,7 @@ wxString PCB_BASE_EDIT_FRAME::GetDesignRulesPath()
|
|||
return Prj().AbsolutePath( fn.GetFullName() );
|
||||
}
|
||||
|
||||
|
||||
void PCB_BASE_EDIT_FRAME::handleActivateEvent( wxActivateEvent& aEvent )
|
||||
{
|
||||
EDA_DRAW_FRAME::handleActivateEvent( aEvent );
|
||||
|
@ -231,3 +232,10 @@ void PCB_BASE_EDIT_FRAME::handleActivateEvent( wxActivateEvent& aEvent )
|
|||
if( m_appearancePanel )
|
||||
m_appearancePanel->RefreshCollapsiblePanes();
|
||||
}
|
||||
|
||||
|
||||
void PCB_BASE_EDIT_FRAME::OnLayerAlphaChanged()
|
||||
{
|
||||
if( m_appearancePanel )
|
||||
m_appearancePanel->OnLayerAlphaChanged();
|
||||
}
|
||||
|
|
|
@ -203,6 +203,11 @@ 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
|
||||
|
|
|
@ -1136,12 +1136,6 @@ void PCB_EDIT_FRAME::OnDisplayOptionsChanged()
|
|||
}
|
||||
|
||||
|
||||
void PCB_EDIT_FRAME::OnUpdateLayerAlpha( wxUpdateUIEvent & )
|
||||
{
|
||||
m_appearancePanel->OnLayerAlphaChanged();
|
||||
}
|
||||
|
||||
|
||||
bool PCB_EDIT_FRAME::IsElementVisible( GAL_LAYER_ID aElement ) const
|
||||
{
|
||||
return GetBoard()->IsElementVisible( aElement );
|
||||
|
|
|
@ -268,11 +268,6 @@ public:
|
|||
*/
|
||||
void SetActiveLayer( PCB_LAYER_ID aLayer ) override;
|
||||
|
||||
/**
|
||||
* Update the UI to reflect changes to the current layer's transparency.
|
||||
*/
|
||||
void OnUpdateLayerAlpha( wxUpdateUIEvent& aEvent ) override;
|
||||
|
||||
void OnDisplayOptionsChanged() override;
|
||||
|
||||
/**
|
||||
|
|
|
@ -361,8 +361,7 @@ int PCB_CONTROL::LayerAlphaInc( const TOOL_EVENT& aEvent )
|
|||
if( IsCopperLayer( currentLayer ) )
|
||||
view->UpdateLayerColor( ZONE_LAYER_FOR( currentLayer ) );
|
||||
|
||||
wxUpdateUIEvent dummy;
|
||||
static_cast<PCB_EDIT_FRAME*>( m_frame )->OnUpdateLayerAlpha( dummy );
|
||||
static_cast<PCB_BASE_EDIT_FRAME*>( m_frame )->OnLayerAlphaChanged();
|
||||
}
|
||||
else
|
||||
wxBell();
|
||||
|
@ -391,8 +390,7 @@ int PCB_CONTROL::LayerAlphaDec( const TOOL_EVENT& aEvent )
|
|||
if( IsCopperLayer( currentLayer ) )
|
||||
view->UpdateLayerColor( ZONE_LAYER_FOR( currentLayer ) );
|
||||
|
||||
wxUpdateUIEvent dummy;
|
||||
static_cast<PCB_BASE_FRAME*>( m_frame )->OnUpdateLayerAlpha( dummy );
|
||||
static_cast<PCB_BASE_EDIT_FRAME*>( m_frame )->OnLayerAlphaChanged();
|
||||
}
|
||||
else
|
||||
wxBell();
|
||||
|
|
Loading…
Reference in New Issue