Commit 0760c126 authored by jean-pierre charras's avatar jean-pierre charras

Code cleaning. Pcbnew: very minor fix

parent 9769c9b6
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
#endif #endif
#ifndef KICAD_BUILD_VERSION #ifndef KICAD_BUILD_VERSION
#define KICAD_BUILD_VERSION "(2011-02-22 BZR 2835)" #define KICAD_BUILD_VERSION "(2011-03-03 BZR 2875)"
#endif #endif
//#define VERSION_STABILITY "stable" //#define VERSION_STABILITY "stable"
......
...@@ -43,6 +43,10 @@ enum id_eeschema_frm ...@@ -43,6 +43,10 @@ enum id_eeschema_frm
ID_SCHEMATIC_DELETE_ITEM_BUTT, ID_SCHEMATIC_DELETE_ITEM_BUTT,
ID_SCHEMATIC_VERTICAL_TOOLBAR_END, ID_SCHEMATIC_VERTICAL_TOOLBAR_END,
// Toolbar options id:
ID_TB_OPTIONS_HIDDEN_PINS,
ID_TB_OPTIONS_BUS_WIRES_ORIENT,
/* Schematic editor context menu IDs. */ /* Schematic editor context menu IDs. */
ID_POPUP_SCH_COPY_ITEM, ID_POPUP_SCH_COPY_ITEM,
......
...@@ -113,7 +113,9 @@ BEGIN_EVENT_TABLE( SCH_EDIT_FRAME, EDA_DRAW_FRAME ) ...@@ -113,7 +113,9 @@ BEGIN_EVENT_TABLE( SCH_EDIT_FRAME, EDA_DRAW_FRAME )
SCH_EDIT_FRAME::Process_Special_Functions ) SCH_EDIT_FRAME::Process_Special_Functions )
// Tools and buttons options toolbar // Tools and buttons options toolbar
EVT_TOOL_RANGE( ID_TB_OPTIONS_START, ID_TB_OPTIONS_END, EVT_TOOL( ID_TB_OPTIONS_HIDDEN_PINS,
SCH_EDIT_FRAME::OnSelectOptionToolbar )
EVT_TOOL( ID_TB_OPTIONS_BUS_WIRES_ORIENT,
SCH_EDIT_FRAME::OnSelectOptionToolbar ) SCH_EDIT_FRAME::OnSelectOptionToolbar )
EVT_MENU_RANGE( ID_POPUP_GENERAL_START_RANGE, ID_POPUP_GENERAL_END_RANGE, EVT_MENU_RANGE( ID_POPUP_GENERAL_START_RANGE, ID_POPUP_GENERAL_END_RANGE,
......
...@@ -93,7 +93,7 @@ BEGIN_EVENT_TABLE( WinEDA_GerberFrame, PCB_BASE_FRAME ) ...@@ -93,7 +93,7 @@ BEGIN_EVENT_TABLE( WinEDA_GerberFrame, PCB_BASE_FRAME )
EVT_MENU( ID_GERBVIEW_POPUP_DELETE_DCODE_ITEMS, WinEDA_GerberFrame::Process_Special_Functions ) EVT_MENU( ID_GERBVIEW_POPUP_DELETE_DCODE_ITEMS, WinEDA_GerberFrame::Process_Special_Functions )
// Option toolbar // Option toolbar
EVT_TOOL_RANGE( ID_TB_OPTIONS_START, ID_TB_OPTIONS_END, EVT_TOOL( ID_TB_OPTIONS_SHOW_POLYGONS_SKETCH,
WinEDA_GerberFrame::OnSelectOptionToolbar ) WinEDA_GerberFrame::OnSelectOptionToolbar )
EVT_TOOL( ID_TB_OPTIONS_SHOW_FLASHED_ITEMS_SKETCH, WinEDA_GerberFrame::OnSelectOptionToolbar ) EVT_TOOL( ID_TB_OPTIONS_SHOW_FLASHED_ITEMS_SKETCH, WinEDA_GerberFrame::OnSelectOptionToolbar )
EVT_TOOL( ID_TB_OPTIONS_SHOW_LINES_SKETCH, WinEDA_GerberFrame::OnSelectOptionToolbar ) EVT_TOOL( ID_TB_OPTIONS_SHOW_LINES_SKETCH, WinEDA_GerberFrame::OnSelectOptionToolbar )
...@@ -111,6 +111,7 @@ BEGIN_EVENT_TABLE( WinEDA_GerberFrame, PCB_BASE_FRAME ) ...@@ -111,6 +111,7 @@ BEGIN_EVENT_TABLE( WinEDA_GerberFrame, PCB_BASE_FRAME )
EVT_UPDATE_UI( ID_TB_OPTIONS_SHOW_DCODES, WinEDA_GerberFrame::OnUpdateShowDCodes ) EVT_UPDATE_UI( ID_TB_OPTIONS_SHOW_DCODES, WinEDA_GerberFrame::OnUpdateShowDCodes )
EVT_UPDATE_UI( ID_TB_OPTIONS_SHOW_LAYERS_MANAGER_VERTICAL_TOOLBAR, EVT_UPDATE_UI( ID_TB_OPTIONS_SHOW_LAYERS_MANAGER_VERTICAL_TOOLBAR,
WinEDA_GerberFrame::OnUpdateShowLayerManager ) WinEDA_GerberFrame::OnUpdateShowLayerManager )
EVT_UPDATE_UI( ID_TOOLBARH_GERBER_SELECT_TOOL, WinEDA_GerberFrame::OnUpdateSelectDCode ) EVT_UPDATE_UI( ID_TOOLBARH_GERBER_SELECT_TOOL, WinEDA_GerberFrame::OnUpdateSelectDCode )
EVT_UPDATE_UI( ID_TOOLBARH_GERBVIEW_SELECT_LAYER, WinEDA_GerberFrame::OnUpdateLayerSelectBox ) EVT_UPDATE_UI( ID_TOOLBARH_GERBVIEW_SELECT_LAYER, WinEDA_GerberFrame::OnUpdateLayerSelectBox )
EVT_UPDATE_UI_RANGE( ID_TB_OPTIONS_SHOW_GBR_MODE_0, ID_TB_OPTIONS_SHOW_GBR_MODE_2, EVT_UPDATE_UI_RANGE( ID_TB_OPTIONS_SHOW_GBR_MODE_0, ID_TB_OPTIONS_SHOW_GBR_MODE_2,
......
...@@ -25,6 +25,7 @@ enum gerbview_ids ...@@ -25,6 +25,7 @@ enum gerbview_ids
ID_TB_OPTIONS_SHOW_DCODES, ID_TB_OPTIONS_SHOW_DCODES,
ID_TB_OPTIONS_SHOW_FLASHED_ITEMS_SKETCH, ID_TB_OPTIONS_SHOW_FLASHED_ITEMS_SKETCH,
ID_TB_OPTIONS_SHOW_LINES_SKETCH, ID_TB_OPTIONS_SHOW_LINES_SKETCH,
ID_TB_OPTIONS_SHOW_POLYGONS_SKETCH,
ID_TB_OPTIONS_SHOW_GBR_MODE_0, ID_TB_OPTIONS_SHOW_GBR_MODE_0,
ID_TB_OPTIONS_SHOW_GBR_MODE_1, ID_TB_OPTIONS_SHOW_GBR_MODE_1,
ID_TB_OPTIONS_SHOW_GBR_MODE_2, ID_TB_OPTIONS_SHOW_GBR_MODE_2,
......
...@@ -200,37 +200,20 @@ enum main_id ...@@ -200,37 +200,20 @@ enum main_id
ID_EDA_SOCKET_EVENT_SERV, ID_EDA_SOCKET_EVENT_SERV,
ID_EDA_SOCKET_EVENT, ID_EDA_SOCKET_EVENT,
/* Command IDs common to PCBNew and GerbView. */ /* Command IDs common to PCBNew and cvpcb. */
ID_PCB_DISPLAY_FOOTPRINT_DOC, ID_PCB_DISPLAY_FOOTPRINT_DOC,
// Common to all
ID_TB_OPTIONS_SELECT_UNIT_MM, ID_TB_OPTIONS_SELECT_UNIT_MM,
ID_TB_OPTIONS_SELECT_UNIT_INCH, ID_TB_OPTIONS_SELECT_UNIT_INCH,
ID_TB_OPTIONS_SELECT_CURSOR, ID_TB_OPTIONS_SELECT_CURSOR,
ID_TB_OPTIONS_SHOW_POLAR_COORD, ID_TB_OPTIONS_SHOW_POLAR_COORD,
ID_TB_OPTIONS_SHOW_GRID, ID_TB_OPTIONS_SHOW_GRID,
ID_TB_OPTIONS_SHOW_PADS_SKETCH,
ID_TB_OPTIONS_SHOW_ZONES,
ID_TB_OPTIONS_SHOW_ZONES_DISABLE,
ID_TB_OPTIONS_SHOW_ZONES_OUTLINES_ONLY,
ID_TB_OPTIONS_START,
ID_TB_OPTIONS_DRC_OFF, // Common to pcbnew, cvpcb
ID_TB_OPTIONS_SHOW_RATSNEST,
ID_TB_OPTIONS_SHOW_MODULE_RATSNEST,
ID_TB_OPTIONS_AUTO_DEL_TRACK,
ID_TB_OPTIONS_HIDDEN_PINS,
ID_TB_OPTIONS_BUS_WIRES_ORIENT,
ID_TB_OPTIONS_SHOW_VIAS_SKETCH,
ID_TB_OPTIONS_SHOW_TRACKS_SKETCH,
ID_TB_OPTIONS_SHOW_MODULE_TEXT_SKETCH, ID_TB_OPTIONS_SHOW_MODULE_TEXT_SKETCH,
ID_TB_OPTIONS_SHOW_MODULE_EDGE_SKETCH, ID_TB_OPTIONS_SHOW_MODULE_EDGE_SKETCH,
ID_TB_OPTIONS_SHOW_HIGH_CONTRAST_MODE, ID_TB_OPTIONS_SHOW_PADS_SKETCH,
ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR1,
ID_TB_OPTIONS_SHOW_POLYGONS_SKETCH,
ID_TB_OPTIONS_END,
ID_END_LIST ID_END_LIST
}; };
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
; General Product Description Definitions ; General Product Description Definitions
!define PRODUCT_NAME "KiCad" !define PRODUCT_NAME "KiCad"
!define PRODUCT_VERSION "2011.02.22" !define PRODUCT_VERSION "2011.03.03"
!define PRODUCT_WEB_SITE "http://iut-tice.ujf-grenoble.fr/kicad/" !define PRODUCT_WEB_SITE "http://iut-tice.ujf-grenoble.fr/kicad/"
!define SOURCEFORGE_WEB_SITE "http://kicad.sourceforge.net/" !define SOURCEFORGE_WEB_SITE "http://kicad.sourceforge.net/"
!define COMPANY_NAME "" !define COMPANY_NAME ""
......
...@@ -115,6 +115,13 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event ) ...@@ -115,6 +115,13 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event )
{ {
case ID_TB_OPTIONS_DRC_OFF: case ID_TB_OPTIONS_DRC_OFF:
Drc_On = !state; Drc_On = !state;
if( GetToolId() == ID_TRACK_BUTT )
{
if( Drc_On )
DrawPanel->SetCursor( wxCURSOR_PENCIL );
else
DrawPanel->SetCursor( wxCURSOR_QUESTION_ARROW );
}
break; break;
case ID_TB_OPTIONS_SHOW_RATSNEST: case ID_TB_OPTIONS_SHOW_RATSNEST:
...@@ -160,7 +167,7 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event ) ...@@ -160,7 +167,7 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event )
DrawPanel->Refresh(); DrawPanel->Refresh();
break; break;
case ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR1: case ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR_MICROWAVE:
m_show_microwave_tools = state; m_show_microwave_tools = state;
m_auimgr.GetPane( wxT( "m_AuxVToolBar" ) ).Show( m_show_microwave_tools ); m_auimgr.GetPane( wxT( "m_AuxVToolBar" ) ).Show( m_show_microwave_tools );
m_auimgr.Update(); m_auimgr.Update();
......
...@@ -66,7 +66,13 @@ BEGIN_EVENT_TABLE( WinEDA_ModuleEditFrame, PCB_BASE_FRAME ) ...@@ -66,7 +66,13 @@ BEGIN_EVENT_TABLE( WinEDA_ModuleEditFrame, PCB_BASE_FRAME )
WinEDA_ModuleEditFrame::OnVerticalToolbar ) WinEDA_ModuleEditFrame::OnVerticalToolbar )
// Options Toolbar // Options Toolbar
EVT_TOOL_RANGE( ID_TB_OPTIONS_START, ID_TB_OPTIONS_END, EVT_TOOL( ID_TB_OPTIONS_SHOW_PADS_SKETCH,
WinEDA_ModuleEditFrame::OnSelectOptionToolbar )
EVT_TOOL( ID_TB_OPTIONS_SHOW_VIAS_SKETCH,
WinEDA_ModuleEditFrame::OnSelectOptionToolbar )
EVT_TOOL( ID_TB_OPTIONS_SHOW_MODULE_TEXT_SKETCH,
WinEDA_ModuleEditFrame::OnSelectOptionToolbar )
EVT_TOOL( ID_TB_OPTIONS_SHOW_MODULE_EDGE_SKETCH,
WinEDA_ModuleEditFrame::OnSelectOptionToolbar ) WinEDA_ModuleEditFrame::OnSelectOptionToolbar )
// popup commands // popup commands
......
...@@ -173,15 +173,30 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME ) ...@@ -173,15 +173,30 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME )
EVT_TOOL( ID_TOOLBARH_PCB_FREEROUTE_ACCESS, PCB_EDIT_FRAME::Access_to_External_Tool ) EVT_TOOL( ID_TOOLBARH_PCB_FREEROUTE_ACCESS, PCB_EDIT_FRAME::Access_to_External_Tool )
// Option toolbar // Option toolbar
EVT_TOOL_RANGE( ID_TB_OPTIONS_START, ID_TB_OPTIONS_END, EVT_TOOL( ID_TB_OPTIONS_DRC_OFF,
PCB_EDIT_FRAME::OnSelectOptionToolbar ) PCB_EDIT_FRAME::OnSelectOptionToolbar )
EVT_TOOL( ID_TB_OPTIONS_SHOW_RATSNEST,
PCB_EDIT_FRAME::OnSelectOptionToolbar )
EVT_TOOL( ID_TB_OPTIONS_SHOW_MODULE_RATSNEST,
PCB_EDIT_FRAME::OnSelectOptionToolbar )
EVT_TOOL( ID_TB_OPTIONS_AUTO_DEL_TRACK,
PCB_EDIT_FRAME::OnSelectOptionToolbar )
EVT_TOOL( ID_TB_OPTIONS_SHOW_VIAS_SKETCH,
PCB_EDIT_FRAME::OnSelectOptionToolbar )
EVT_TOOL( ID_TB_OPTIONS_SHOW_TRACKS_SKETCH,
PCB_EDIT_FRAME::OnSelectOptionToolbar )
EVT_TOOL( ID_TB_OPTIONS_SHOW_HIGH_CONTRAST_MODE,
PCB_EDIT_FRAME::OnSelectOptionToolbar )
EVT_TOOL( ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR_MICROWAVE,
PCB_EDIT_FRAME::OnSelectOptionToolbar )
EVT_TOOL_RANGE( ID_TB_OPTIONS_SHOW_ZONES, ID_TB_OPTIONS_SHOW_ZONES_OUTLINES_ONLY, EVT_TOOL_RANGE( ID_TB_OPTIONS_SHOW_ZONES, ID_TB_OPTIONS_SHOW_ZONES_OUTLINES_ONLY,
PCB_EDIT_FRAME::OnSelectOptionToolbar ) PCB_EDIT_FRAME::OnSelectOptionToolbar )
EVT_TOOL( ID_TB_OPTIONS_SHOW_MANAGE_LAYERS_VERTICAL_TOOLBAR, EVT_TOOL( ID_TB_OPTIONS_SHOW_MANAGE_LAYERS_VERTICAL_TOOLBAR,
PCB_EDIT_FRAME::OnSelectOptionToolbar ) PCB_EDIT_FRAME::OnSelectOptionToolbar )
// Vertical toolbar: // Vertical main toolbar:
EVT_TOOL( ID_NO_TOOL_SELECTED, PCB_EDIT_FRAME::OnSelectTool ) EVT_TOOL( ID_NO_TOOL_SELECTED, PCB_EDIT_FRAME::OnSelectTool )
EVT_TOOL_RANGE( ID_PCB_HIGHLIGHT_BUTT, ID_PCB_PLACE_GRID_COORD_BUTT, EVT_TOOL_RANGE( ID_PCB_HIGHLIGHT_BUTT, ID_PCB_PLACE_GRID_COORD_BUTT,
PCB_EDIT_FRAME::OnSelectTool ) PCB_EDIT_FRAME::OnSelectTool )
...@@ -220,7 +235,7 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME ) ...@@ -220,7 +235,7 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME )
PCB_EDIT_FRAME::OnUpdateHighContrastDisplayMode ) PCB_EDIT_FRAME::OnUpdateHighContrastDisplayMode )
EVT_UPDATE_UI( ID_TB_OPTIONS_SHOW_MANAGE_LAYERS_VERTICAL_TOOLBAR, EVT_UPDATE_UI( ID_TB_OPTIONS_SHOW_MANAGE_LAYERS_VERTICAL_TOOLBAR,
PCB_EDIT_FRAME::OnUpdateShowLayerManager ) PCB_EDIT_FRAME::OnUpdateShowLayerManager )
EVT_UPDATE_UI( ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR1, EVT_UPDATE_UI( ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR_MICROWAVE,
PCB_EDIT_FRAME::OnUpdateShowMicrowaveToolbar ) PCB_EDIT_FRAME::OnUpdateShowMicrowaveToolbar )
EVT_UPDATE_UI( ID_NO_TOOL_SELECTED, PCB_EDIT_FRAME::OnUpdateVerticalToolbar ) EVT_UPDATE_UI( ID_NO_TOOL_SELECTED, PCB_EDIT_FRAME::OnUpdateVerticalToolbar )
EVT_UPDATE_UI( ID_AUX_TOOLBAR_PCB_TRACK_WIDTH, PCB_EDIT_FRAME::OnUpdateSelectTrackWidth ) EVT_UPDATE_UI( ID_AUX_TOOLBAR_PCB_TRACK_WIDTH, PCB_EDIT_FRAME::OnUpdateSelectTrackWidth )
......
...@@ -246,6 +246,17 @@ enum pcbnew_ids ...@@ -246,6 +246,17 @@ enum pcbnew_ids
ID_MENU_PCB_SHOW_HIDE_LAYERS_MANAGER_DIALOG, ID_MENU_PCB_SHOW_HIDE_LAYERS_MANAGER_DIALOG,
ID_TB_OPTIONS_SHOW_MANAGE_LAYERS_VERTICAL_TOOLBAR, ID_TB_OPTIONS_SHOW_MANAGE_LAYERS_VERTICAL_TOOLBAR,
ID_TB_OPTIONS_SHOW_ZONES,
ID_TB_OPTIONS_SHOW_ZONES_DISABLE,
ID_TB_OPTIONS_SHOW_ZONES_OUTLINES_ONLY,
ID_TB_OPTIONS_DRC_OFF,
ID_TB_OPTIONS_SHOW_RATSNEST,
ID_TB_OPTIONS_SHOW_MODULE_RATSNEST,
ID_TB_OPTIONS_AUTO_DEL_TRACK,
ID_TB_OPTIONS_SHOW_VIAS_SKETCH,
ID_TB_OPTIONS_SHOW_TRACKS_SKETCH,
ID_TB_OPTIONS_SHOW_HIGH_CONTRAST_MODE,
ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR_MICROWAVE,
ID_PCB_MUWAVE_START_CMD, ID_PCB_MUWAVE_START_CMD,
ID_PCB_MUWAVE_TOOL_DISPLAY_TOOLS, ID_PCB_MUWAVE_TOOL_DISPLAY_TOOLS,
......
...@@ -364,7 +364,7 @@ void PCB_EDIT_FRAME::ReCreateOptToolbar() ...@@ -364,7 +364,7 @@ void PCB_EDIT_FRAME::ReCreateOptToolbar()
wxBitmap( layers_manager_xpm ), wxBitmap( layers_manager_xpm ),
HELP_SHOW_HIDE_LAYERMANAGER, HELP_SHOW_HIDE_LAYERMANAGER,
wxITEM_CHECK ); wxITEM_CHECK );
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR1, m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR_MICROWAVE,
wxEmptyString, wxEmptyString,
wxBitmap( mw_toolbar_xpm ), wxBitmap( mw_toolbar_xpm ),
_( "Show/hide the toolbar for microwaves tools\n This is a experimental feature (under development)" ), _( "Show/hide the toolbar for microwaves tools\n This is a experimental feature (under development)" ),
......
release version: release version:
2011 feb 22 2011 mar 03
files (.zip,.tgz): files (.zip,.tgz):
kicad-2011-02-22 kicad-2011-03-03
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