diff --git a/pcbnew/tools/pcb_actions.cpp b/pcbnew/tools/pcb_actions.cpp index 4db16629c2..92ad22a2a8 100644 --- a/pcbnew/tools/pcb_actions.cpp +++ b/pcbnew/tools/pcb_actions.cpp @@ -702,7 +702,7 @@ TOOL_ACTION PCB_ACTIONS::moduleEdgeOutlines( "pcbnew.Control.graphicOutlines", TOOL_ACTION PCB_ACTIONS::zoneDisplayEnable( "pcbnew.Control.zoneDisplayEnable", AS_GLOBAL, 0, "", _( "Fill Zones" ), _( "Show filled areas of zones" ), - show_zone_xpm); + show_zone_xpm ); TOOL_ACTION PCB_ACTIONS::zoneDisplayDisable( "pcbnew.Control.zoneDisplayDisable", AS_GLOBAL, 0, "", @@ -712,7 +712,14 @@ TOOL_ACTION PCB_ACTIONS::zoneDisplayDisable( "pcbnew.Control.zoneDisplayDisable" TOOL_ACTION PCB_ACTIONS::zoneDisplayOutlines( "pcbnew.Control.zoneDisplayOutlines", AS_GLOBAL, 0, "", _( "Sketch Zones" ), _( "Show solid areas of zones in outline mode" ), - show_zone_outline_only_xpm); + show_zone_outline_only_xpm ); + +TOOL_ACTION PCB_ACTIONS::zoneDisplayToggle( "pcbnew.Control.zoneDisplayToggle", + AS_GLOBAL, + 'Z', "", + _( "Toggle Zone Display" ), + _( "Cycle between showing filled zones, wireframed zones and sketched zones" ), + show_zone_xpm ); // Layer control diff --git a/pcbnew/tools/pcb_actions.h b/pcbnew/tools/pcb_actions.h index 00b9b6e207..f4e48bf0e1 100644 --- a/pcbnew/tools/pcb_actions.h +++ b/pcbnew/tools/pcb_actions.h @@ -226,6 +226,7 @@ public: static TOOL_ACTION zoneDisplayEnable; static TOOL_ACTION zoneDisplayDisable; static TOOL_ACTION zoneDisplayOutlines; + static TOOL_ACTION zoneDisplayToggle; // Layer control static TOOL_ACTION layerTop; diff --git a/pcbnew/tools/pcbnew_control.cpp b/pcbnew/tools/pcbnew_control.cpp index a55df40c54..920bd17c47 100644 --- a/pcbnew/tools/pcbnew_control.cpp +++ b/pcbnew/tools/pcbnew_control.cpp @@ -256,6 +256,8 @@ int PCBNEW_CONTROL::ZoneDisplayMode( const TOOL_EVENT& aEvent ) opts->m_DisplayZonesMode = 1; else if( aEvent.IsAction( &PCB_ACTIONS::zoneDisplayOutlines ) ) opts->m_DisplayZonesMode = 2; + else if( aEvent.IsAction( &PCB_ACTIONS::zoneDisplayToggle ) ) + opts->m_DisplayZonesMode = ( opts->m_DisplayZonesMode + 1 ) % 3; else wxFAIL; @@ -906,6 +908,7 @@ void PCBNEW_CONTROL::setTransitions() Go( &PCBNEW_CONTROL::ZoneDisplayMode, PCB_ACTIONS::zoneDisplayEnable.MakeEvent() ); Go( &PCBNEW_CONTROL::ZoneDisplayMode, PCB_ACTIONS::zoneDisplayDisable.MakeEvent() ); Go( &PCBNEW_CONTROL::ZoneDisplayMode, PCB_ACTIONS::zoneDisplayOutlines.MakeEvent() ); + Go( &PCBNEW_CONTROL::ZoneDisplayMode, PCB_ACTIONS::zoneDisplayToggle.MakeEvent() ); Go( &PCBNEW_CONTROL::HighContrastMode, ACTIONS::highContrastMode.MakeEvent() ); // Layer control