Commit e373850d authored by Nick Østergaard's avatar Nick Østergaard Committed by Wayne Stambaugh

Add remove fill and fill all zones hot keys.

parent 0e996cac
......@@ -126,6 +126,10 @@ static EDA_HOTKEY HkCanvasOpenGL( wxT( "Switch to OpenGL Canvas" ),
static EDA_HOTKEY HkCanvasCairo( wxT( "Switch to Cairo Canvas" ),
HK_CANVAS_CAIRO, WXK_F12 );
static EDA_HOTKEY HkZoneFillOrRefill( wxT( "Fill or Refill All Zones" ),
HK_ZONE_FILL_OR_REFILL, 'B' );
static EDA_HOTKEY HkZoneRemoveFilled( wxT( "Remove Filled Areas in All Zones" ),
HK_ZONE_REMOVE_FILLED, 'N' );
/* Fit on Screen */
#if !defined( __WXMAC__ )
static EDA_HOTKEY HkZoomAuto( wxT( "Zoom Auto" ), HK_ZOOM_AUTO, WXK_HOME );
......@@ -289,6 +293,7 @@ EDA_HOTKEY* board_edit_Hotkey_List[] =
&HkRecordMacros8, &HkCallMacros8, &HkRecordMacros9, &HkCallMacros9,
&HkSwitchHighContrastMode,
&HkCanvasDefault, &HkCanvasCairo, &HkCanvasOpenGL,
&HkZoneFillOrRefill, &HkZoneRemoveFilled,
NULL
};
......
......@@ -114,7 +114,9 @@ enum hotkey_id_commnand {
HK_CANVAS_OPENGL,
HK_CANVAS_CAIRO,
HK_LEFT_CLICK,
HK_LEFT_DCLICK
HK_LEFT_DCLICK,
HK_ZONE_FILL_OR_REFILL,
HK_ZONE_REMOVE_FILLED
};
// Full list of hotkey descriptors for board editor and footprint editor
......
......@@ -41,6 +41,7 @@
#include <pcbnew.h>
#include <pcbnew_id.h>
#include <hotkeys.h>
#include <class_zone.h>
/* How to add a new hotkey:
* see hotkeys.cpp
......@@ -566,6 +567,13 @@ bool PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit
case HK_CANVAS_DEFAULT:
evt_type = ID_MENU_CANVAS_DEFAULT;
break;
case HK_ZONE_FILL_OR_REFILL:
evt_type = ID_POPUP_PCB_FILL_ALL_ZONES;
break;
case HK_ZONE_REMOVE_FILLED:
evt_type = ID_POPUP_PCB_REMOVE_FILLED_AREAS_IN_ALL_ZONES;
break;
}
if( evt_type != 0 )
......
......@@ -319,10 +319,14 @@ bool PCB_EDIT_FRAME::OnRightClick( const wxPoint& aMousePos, wxMenu* aPopMenu )
if( GetBoard()->m_ZoneDescriptorList.size() > 0 )
{
aPopMenu->AppendSeparator();
msg = AddHotkeyName( _( "Fill or Refill All Zones" ),
g_Board_Editor_Hokeys_Descr, HK_ZONE_FILL_OR_REFILL );
AddMenuItem( aPopMenu, ID_POPUP_PCB_FILL_ALL_ZONES,
_( "Fill or Refill All Zones" ), KiBitmap( fill_zone_xpm ) );
msg, KiBitmap( fill_zone_xpm ) );
msg = AddHotkeyName( _( "Remove Filled Areas in All Zones" ),
g_Board_Editor_Hokeys_Descr, HK_ZONE_REMOVE_FILLED );
AddMenuItem( aPopMenu, ID_POPUP_PCB_REMOVE_FILLED_AREAS_IN_ALL_ZONES,
_( "Remove Filled Areas in All Zones" ), KiBitmap( zone_unfill_xpm ) );
msg, KiBitmap( zone_unfill_xpm ) );
aPopMenu->AppendSeparator();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment