Turn on zone visibility when you start drawing a zone
It's disconcerting to have the zone turn invisible when you finish drawing and drop the selection.
This commit is contained in:
parent
c5d45f8a78
commit
e832a94a9c
|
@ -205,6 +205,13 @@ void PCB_BASE_EDIT_FRAME::SetGridVisibility( bool aVisible )
|
|||
}
|
||||
|
||||
|
||||
void PCB_BASE_EDIT_FRAME::SetObjectVisible( GAL_LAYER_ID aLayer, bool aVisible )
|
||||
{
|
||||
if( m_appearancePanel )
|
||||
m_appearancePanel->SetObjectVisible( aLayer, aVisible );
|
||||
}
|
||||
|
||||
|
||||
COLOR_SETTINGS* PCB_BASE_EDIT_FRAME::GetColorSettings()
|
||||
{
|
||||
return Pgm().GetSettingsManager().GetColorSettings( GetPcbNewSettings()->m_ColorTheme );
|
||||
|
|
|
@ -168,6 +168,8 @@ public:
|
|||
*/
|
||||
void SetGridVisibility( bool aVisible ) override;
|
||||
|
||||
void SetObjectVisible( GAL_LAYER_ID aLayer, bool aVisible = true );
|
||||
|
||||
/**
|
||||
* Function GetRotationAngle()
|
||||
* Returns the angle used for rotate operations.
|
||||
|
|
|
@ -1753,6 +1753,9 @@ int DRAWING_TOOL::DrawZone( const TOOL_EVENT& aEvent )
|
|||
if( !getSourceZoneForAction( zoneMode, &sourceZone ) )
|
||||
return 0;
|
||||
|
||||
// Turn zones on if they are off, so that the created object will be visible after completion
|
||||
m_frame->SetObjectVisible( LAYER_ZONES );
|
||||
|
||||
ZONE_CREATE_HELPER::PARAMS params;
|
||||
|
||||
params.m_keepout = drawMode == MODE::KEEPOUT;
|
||||
|
|
|
@ -1039,12 +1039,14 @@ void APPEARANCE_CONTROLS::SetLayerVisible( LAYER_NUM aLayer, bool isVisible )
|
|||
|
||||
void APPEARANCE_CONTROLS::SetObjectVisible( GAL_LAYER_ID aLayer, bool isVisible )
|
||||
{
|
||||
// Currently only used for the grid, so we just update the ui
|
||||
if( m_objectSettingsMap.count( aLayer ) )
|
||||
{
|
||||
APPEARANCE_SETTING* setting = m_objectSettingsMap.at( aLayer );
|
||||
setting->ctl_visibility->SetValue( isVisible );
|
||||
}
|
||||
|
||||
m_frame->GetCanvas()->GetView()->SetLayerVisible( aLayer, isVisible );
|
||||
m_frame->GetCanvas()->Refresh();
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue