++ Pcbnew:

* in variable names, change non existent word Hight to High
    * Remove redundant tool in left toolbar (option toolbar)
      (this option is now in layers manager)
    * Show layers in horizontal combo box in same order as in layer manager.
++all:
    minor code cleaning.
This commit is contained in:
charras 2010-01-24 13:46:01 +00:00
parent c45d8cd4d2
commit 96a9769f6c
30 changed files with 1008 additions and 994 deletions

View File

@ -4,6 +4,17 @@ KiCad ChangeLog 2010
Please add newer entries at the top, list the date and your name with Please add newer entries at the top, list the date and your name with
email address. email address.
2010-Jan-24 UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
================================================================================
++ Pcbnew:
in variable names, change non existent word Hight to High
Remove redundant tool in left toolbar (option toolbar)
(this option is now in layers manager)
Show layers in horizontal combo box in same order as in layer manager.
++all:
minor code cleaning.
2010-Jan-23 UPDATE Dick Hollenbeck <dick@softplc.com> 2010-Jan-23 UPDATE Dick Hollenbeck <dick@softplc.com>
================================================================================ ================================================================================
++pcbnew's PCB_LAYER_WIDGET ++pcbnew's PCB_LAYER_WIDGET

View File

@ -247,7 +247,6 @@ set(BITMAP_SRCS
mw_Add_Stub.xpm mw_Add_Stub.xpm
mw_toolbar.xpm mw_toolbar.xpm
Net_HighLight.xpm Net_HighLight.xpm
net_hightlight.xpm
netlist.xpm netlist.xpm
Net_Locked.xpm Net_Locked.xpm
Net_UnLocked.xpm Net_UnLocked.xpm

View File

@ -1,30 +0,0 @@
/* XPM */
#ifndef XPMMAIN
extern const char* net_hightlight_xpm[];
#else
const char *net_hightlight_xpm[] = {
/* columns rows colors const chars-per-pixel */
"16 16 3 1",
"- c #008000",
". c #00FF00",
"X c None",
/* pixels */
"XXXXXXXXXXXXXXXX",
"XXXXXX-XXXXXXXXX",
"XXXXXX-XXXXXXXXX",
"XXXXXX-XXXXXXXXX",
"XXXXXX-XXXXXXXXX",
"XXXXX...XXXXXXXX",
"XXXX.....XXXXXXX",
"----.....------X",
"XXXX.....XXXXXXX",
"XXXXX...XXXXXXXX",
"XXXXXX-XXXXXXXXX",
"XXXXXX-XXXXXXXXX",
"XXXXXX-XXXXXXXXX",
"XXXXXX-XXXXXXXXX",
"XXXXXX-XXXXXXXXX",
"XXXXXXXXXXXXXXXX"
};
#endif

View File

@ -157,6 +157,8 @@ void WinEDA_ViewlibFrame::ReCreateHToolbar()
m_HToolBar->EnableTool( ID_LIBVIEW_VIEWDOC, m_HToolBar->EnableTool( ID_LIBVIEW_VIEWDOC,
entry && ( entry->GetDocFileName() != wxEmptyString ) ); entry && ( entry->GetDocFileName() != wxEmptyString ) );
m_HToolBar->Refresh();
} }

View File

@ -13,6 +13,7 @@
#include "pcbplot.h" #include "pcbplot.h"
#include "protos.h" #include "protos.h"
#include "kicad_device_context.h" #include "kicad_device_context.h"
#include "gerbview_id.h"
/* Process the command triggered by the left button of the mouse when a tool /* Process the command triggered by the left button of the mouse when a tool

View File

@ -16,6 +16,7 @@
#include "pcbplot.h" #include "pcbplot.h"
#include "bitmaps.h" #include "bitmaps.h"
#include "protos.h" #include "protos.h"
#include "gerbview_id.h"
/****************************************/ /****************************************/
@ -87,7 +88,6 @@ BEGIN_EVENT_TABLE( WinEDA_GerberFrame, WinEDA_BasePcbFrame )
EVT_TOOL( wxID_UNDO, WinEDA_GerberFrame::Process_Special_Functions ) EVT_TOOL( wxID_UNDO, WinEDA_GerberFrame::Process_Special_Functions )
EVT_TOOL( ID_GEN_PRINT, WinEDA_GerberFrame::ToPrinter ) EVT_TOOL( ID_GEN_PRINT, WinEDA_GerberFrame::ToPrinter )
EVT_TOOL( ID_FIND_ITEMS, WinEDA_GerberFrame::Process_Special_Functions ) EVT_TOOL( ID_FIND_ITEMS, WinEDA_GerberFrame::Process_Special_Functions )
EVT_TOOL( ID_DRC_CONTROL, WinEDA_GerberFrame::Process_Special_Functions )
EVT_KICAD_CHOICEBOX( ID_TOOLBARH_PCB_SELECT_LAYER, EVT_KICAD_CHOICEBOX( ID_TOOLBARH_PCB_SELECT_LAYER,
WinEDA_GerberFrame::Process_Special_Functions ) WinEDA_GerberFrame::Process_Special_Functions )
@ -96,8 +96,6 @@ BEGIN_EVENT_TABLE( WinEDA_GerberFrame, WinEDA_BasePcbFrame )
// Vertical toolbar: // Vertical toolbar:
EVT_TOOL( ID_NO_SELECT_BUTT, WinEDA_GerberFrame::Process_Special_Functions ) EVT_TOOL( ID_NO_SELECT_BUTT, WinEDA_GerberFrame::Process_Special_Functions )
EVT_TOOL( ID_TRACK_BUTT, WinEDA_GerberFrame::Process_Special_Functions )
EVT_TOOL( ID_PCB_ZONES_BUTT, WinEDA_GerberFrame::Process_Special_Functions )
EVT_TOOL( ID_PCB_DELETE_ITEM_BUTT, EVT_TOOL( ID_PCB_DELETE_ITEM_BUTT,
WinEDA_GerberFrame::Process_Special_Functions ) WinEDA_GerberFrame::Process_Special_Functions )

25
gerbview/gerbview_id.h Normal file
View File

@ -0,0 +1,25 @@
#ifndef __GERBVIEW_ID_H__
#define __GERBVIEW_ID_H__
#include "id.h"
/**
* Command IDs for the printed circuit board editor.
*
* Please add IDs that are unique to the printed circuit board editor (PCBNew)
* here and not in the global id.h file. This will prevent the entire project
* from being rebuilt when adding new commands to the PCBNew.
*/
enum gerbview_ids
{
ID_MAIN_MENUBAR = ID_END_LIST,
ID_TOOLBARH_PCB_SELECT_LAYER,
ID_PCB_DELETE_ITEM_BUTT,
ID_PCB_GLOBAL_DELETE,
ID_POPUP_PCB_DELETE_TRACKSEG,
ID_PCB_DISPLAY_OPTIONS_SETUP
};
#endif /* __GERBVIEW_IDS_H__ */

View File

@ -10,6 +10,7 @@
#include "pcbplot.h" #include "pcbplot.h"
#include "protos.h" #include "protos.h"
#include "bitmaps.h" #include "bitmaps.h"
#include "gerbview_id.h"
#include "hotkeys.h" #include "hotkeys.h"

View File

@ -238,7 +238,6 @@ extern const char* mw_Add_stub_arc_xpm[];
extern const char* mw_Add_Stub_xpm[]; extern const char* mw_Add_Stub_xpm[];
extern const char* mw_toolbar_xpm[]; extern const char* mw_toolbar_xpm[];
extern const char* net_highlight_xpm[]; extern const char* net_highlight_xpm[];
extern const char* net_hightlight_xpm[];
extern const char* netlist_xpm[]; extern const char* netlist_xpm[];
extern const char* net_locked_xpm[]; extern const char* net_locked_xpm[];
extern const char* net_unlocked_xpm[]; extern const char* net_unlocked_xpm[];

View File

@ -235,19 +235,8 @@ enum main_id
ID_TB_OPTIONS_SHOW_HIGH_CONTRAST_MODE, ID_TB_OPTIONS_SHOW_HIGH_CONTRAST_MODE,
ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR1, ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR1,
ID_TB_OPTIONS_SHOW_POLYGONS_SKETCH, ID_TB_OPTIONS_SHOW_POLYGONS_SKETCH,
ID_TB_OPTIONS_SHOW_INVISIBLE_TEXT_MODE,
ID_TB_OPTIONS_END, ID_TB_OPTIONS_END,
ID_DRC_CONTROL,
ID_PCB_GLOBAL_DELETE,
ID_TRACK_BUTT,
ID_PCB_ZONES_BUTT,
ID_PCB_DELETE_ITEM_BUTT,
ID_POPUP_PCB_DELETE_TRACKSEG,
ID_TOOLBARH_PCB_SELECT_LAYER,
ID_PCB_DISPLAY_OPTIONS_SETUP,
ID_END_LIST ID_END_LIST
}; };

View File

@ -505,7 +505,7 @@ public:
// Highlight functions: // Highlight functions:
int Select_High_Light( wxDC* DC ); int Select_High_Light( wxDC* DC );
void Hight_Light( wxDC* DC ); void High_Light( wxDC* DC );
// Track and via edition: // Track and via edition:
void Via_Edit_Control( wxCommandEvent& event ); void Via_Edit_Control( wxCommandEvent& event );

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -411,7 +411,7 @@ public:
* Function DrawHighLight * Function DrawHighLight
* redraws the objects in the board that are associated with the given aNetCode * redraws the objects in the board that are associated with the given aNetCode
* and turns on or off the brilliance associated with that net according to the * and turns on or off the brilliance associated with that net according to the
* current value of global g_HightLigt_Status * current value of global g_HighLight_Status
* @param aDrawPanel is needed for the clipping support. * @param aDrawPanel is needed for the clipping support.
* @param aNetCode is the net number to highlight or to dim. * @param aNetCode is the net number to highlight or to dim.
*/ */

View File

@ -93,13 +93,13 @@ void RemoteCommand( const char* cmdline )
if( netcode > 0 ) /* highlight the pad net*/ if( netcode > 0 ) /* highlight the pad net*/
{ {
g_HightLigt_Status = 1; g_HighLight_Status = 1;
g_HightLigth_NetCode = netcode; g_HighLight_NetCode = netcode;
} }
else else
{ {
g_HightLigt_Status = 0; g_HighLight_Status = 0;
g_HightLigth_NetCode = 0; g_HighLight_NetCode = 0;
} }
if( module == NULL ) if( module == NULL )

View File

@ -89,8 +89,8 @@ TRACK* WinEDA_PcbFrame::Delete_Segment( wxDC* DC, TRACK* aTrack )
DrawPanel->ManageCurseur = NULL; DrawPanel->ManageCurseur = NULL;
DrawPanel->ForceCloseManageCurseur = NULL; DrawPanel->ForceCloseManageCurseur = NULL;
if( g_HightLigt_Status ) if( g_HighLight_Status )
Hight_Light( DC ); High_Light( DC );
SetCurItem( NULL ); SetCurItem( NULL );
return NULL; return NULL;

View File

@ -249,12 +249,6 @@ void WinEDA_PcbFrame::OnSelectOptionToolbar( wxCommandEvent& event )
DrawPanel->Refresh(); DrawPanel->Refresh();
break; break;
case ID_TB_OPTIONS_SHOW_INVISIBLE_TEXT_MODE:
g_DesignSettings.SetElementVisibility( MOD_TEXT_INVISIBLE,
m_OptionsToolBar->GetToolState( id ) );
DrawPanel->Refresh();
break;
case ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR1: case ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR1:
m_show_microwave_tools = m_OptionsToolBar->GetToolState( id ); m_show_microwave_tools = m_OptionsToolBar->GetToolState( id );
#if !defined(KICAD_AUIMANAGER) #if !defined(KICAD_AUIMANAGER)

View File

@ -238,8 +238,8 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
SetToolID( id, wxCURSOR_PENCIL, _( "Add Zones" ) ); SetToolID( id, wxCURSOR_PENCIL, _( "Add Zones" ) );
if( DisplayOpt.DisplayZonesMode != 0 ) if( DisplayOpt.DisplayZonesMode != 0 )
DisplayInfoMessage( this, _( "Warning: Display Zone is OFF!!!" ) ); DisplayInfoMessage( this, _( "Warning: Display Zone is OFF!!!" ) );
if( !g_HightLigt_Status && (g_HightLigth_NetCode > 0 ) ) if( !g_HighLight_Status && (g_HighLight_NetCode > 0 ) )
Hight_Light( &dc ); High_Light( &dc );
break; break;
case ID_PCB_MIRE_BUTT: case ID_PCB_MIRE_BUTT:

View File

@ -68,7 +68,8 @@ void WinEDA_PcbFrame::ExChange_Track_Layer( TRACK* pt_segm, wxDC* DC )
l1 = Route_Layer_TOP; l2 = Route_Layer_BOTTOM; l1 = Route_Layer_TOP; l2 = Route_Layer_BOTTOM;
pt_track = Marque_Une_Piste( GetBoard(), pt_segm, &nb_segm, NULL, true ); pt_track = Marque_Une_Piste( GetBoard(), pt_segm, &nb_segm, NULL, true );
Trace_Une_Piste( DrawPanel, DC, pt_track, nb_segm, GR_XOR ); if ( DC )
Trace_Une_Piste( DrawPanel, DC, pt_track, nb_segm, GR_XOR );
/* Clear the BUSY flag and backup member. Param layer original. */ /* Clear the BUSY flag and backup member. Param layer original. */
ii = nb_segm; pt_segm = pt_track; ii = nb_segm; pt_segm = pt_track;
@ -101,7 +102,8 @@ void WinEDA_PcbFrame::ExChange_Track_Layer( TRACK* pt_segm, wxDC* DC )
pt_segm->SetLayer( pt_segm->m_Param ); pt_segm->SetLayer( pt_segm->m_Param );
} }
Trace_Une_Piste( DrawPanel, DC, pt_track, nb_segm, GR_OR ); if( DC )
Trace_Une_Piste( DrawPanel, DC, pt_track, nb_segm, GR_OR );
DisplayError( this, _( "Drc error, canceled" ), 10 ); DisplayError( this, _( "Drc error, canceled" ), 10 );
return; return;
} }
@ -180,7 +182,7 @@ bool WinEDA_PcbFrame::Other_Layer_Route( TRACK* aTrack, wxDC* DC )
via->m_Flags = IS_NEW; via->m_Flags = IS_NEW;
via->m_Shape = g_DesignSettings.m_CurrentViaType; via->m_Shape = g_DesignSettings.m_CurrentViaType;
via->m_Width = GetBoard()->GetCurrentViaSize(); via->m_Width = GetBoard()->GetCurrentViaSize();
via->SetNet( g_HightLigth_NetCode ); via->SetNet( g_HighLight_NetCode );
via->m_Start = via->m_End = g_CurrentTrackSegment->m_End; via->m_Start = via->m_End = g_CurrentTrackSegment->m_End;
int old_layer = getActiveLayer(); int old_layer = getActiveLayer();

View File

@ -42,12 +42,12 @@ static void Exit_Editrack( WinEDA_DrawPanel* Panel, wxDC* DC )
{ {
/* Erase the current drawing */ /* Erase the current drawing */
ShowNewTrackWhenMovingCursor( Panel, DC, false ); ShowNewTrackWhenMovingCursor( Panel, DC, false );
if( g_HightLigt_Status ) if( g_HighLight_Status )
frame->Hight_Light( DC ); frame->High_Light( DC );
g_HightLigth_NetCode = OldNetCodeSurbrillance; g_HighLight_NetCode = OldNetCodeSurbrillance;
if( OldEtatSurbrillance ) if( OldEtatSurbrillance )
frame->Hight_Light( DC ); frame->High_Light( DC );
frame->MsgPanel->EraseMsgBox(); frame->MsgPanel->EraseMsgBox();
@ -98,16 +98,16 @@ TRACK* WinEDA_PcbFrame::Begin_Route( TRACK* aTrack, wxDC* DC )
// but... // but...
/* erase old highlight */ /* erase old highlight */
OldNetCodeSurbrillance = g_HightLigth_NetCode; OldNetCodeSurbrillance = g_HighLight_NetCode;
OldEtatSurbrillance = g_HightLigt_Status; OldEtatSurbrillance = g_HighLight_Status;
if( g_HightLigt_Status ) if( g_HighLight_Status )
Hight_Light( DC ); High_Light( DC );
g_CurrentTrackList.PushBack( new TRACK( GetBoard() ) ); g_CurrentTrackList.PushBack( new TRACK( GetBoard() ) );
g_CurrentTrackSegment->m_Flags = IS_NEW; g_CurrentTrackSegment->m_Flags = IS_NEW;
g_HightLigth_NetCode = 0; g_HighLight_NetCode = 0;
// Search for a starting point of the new track, a track or pad // Search for a starting point of the new track, a track or pad
LockPoint = LocateLockPoint( GetBoard(), pos, masquelayer ); LockPoint = LocateLockPoint( GetBoard(), pos, masquelayer );
@ -120,12 +120,12 @@ TRACK* WinEDA_PcbFrame::Begin_Route( TRACK* aTrack, wxDC* DC )
/* A pad is found: put the starting point on pad centre */ /* A pad is found: put the starting point on pad centre */
pos = pt_pad->m_Pos; pos = pt_pad->m_Pos;
g_HightLigth_NetCode = pt_pad->GetNet(); g_HighLight_NetCode = pt_pad->GetNet();
} }
else /* A track segment is found */ else /* A track segment is found */
{ {
TrackOnStartPoint = (TRACK*) LockPoint; TrackOnStartPoint = (TRACK*) LockPoint;
g_HightLigth_NetCode = TrackOnStartPoint->GetNet(); g_HighLight_NetCode = TrackOnStartPoint->GetNet();
CreateLockPoint( pos, CreateLockPoint( pos,
TrackOnStartPoint, TrackOnStartPoint,
NULL, NULL,
@ -140,7 +140,7 @@ TRACK* WinEDA_PcbFrame::Begin_Route( TRACK* aTrack, wxDC* DC )
GetScreen()-> GetScreen()->
m_Active_Layer ); m_Active_Layer );
if( zone ) if( zone )
g_HightLigth_NetCode = zone->GetNet(); g_HighLight_NetCode = zone->GetNet();
} }
D( g_CurrentTrackList.VerifyListIntegrity(); ); D( g_CurrentTrackList.VerifyListIntegrity(); );
@ -149,10 +149,10 @@ TRACK* WinEDA_PcbFrame::Begin_Route( TRACK* aTrack, wxDC* DC )
D( g_CurrentTrackList.VerifyListIntegrity(); ); D( g_CurrentTrackList.VerifyListIntegrity(); );
Hight_Light( DC ); High_Light( DC );
// Display info about track Net class, and init track and vias sizes: // Display info about track Net class, and init track and vias sizes:
g_CurrentTrackSegment->SetNet( g_HightLigth_NetCode ); g_CurrentTrackSegment->SetNet( g_HighLight_NetCode );
GetBoard()->SetCurrentNetClass( g_CurrentTrackSegment->GetNetClassName() ); GetBoard()->SetCurrentNetClass( g_CurrentTrackSegment->GetNetClassName() );
m_TrackAndViasSizesList_Changed = true; m_TrackAndViasSizesList_Changed = true;
AuxiliaryToolBar_Update_UI(); AuxiliaryToolBar_Update_UI();
@ -474,7 +474,7 @@ void WinEDA_PcbFrame::End_Route( TRACK* aTrack, wxDC* DC )
* possibly create an anchor. */ * possibly create an anchor. */
{ {
TRACK* adr_buf = (TRACK*) LockPoint; TRACK* adr_buf = (TRACK*) LockPoint;
g_HightLigth_NetCode = adr_buf->GetNet(); g_HighLight_NetCode = adr_buf->GetNet();
/* Possible establishment of a hanging point. */ /* Possible establishment of a hanging point. */
LockPoint = CreateLockPoint( g_CurrentTrackSegment->m_End, LockPoint = CreateLockPoint( g_CurrentTrackSegment->m_End,
@ -536,12 +536,12 @@ void WinEDA_PcbFrame::End_Route( TRACK* aTrack, wxDC* DC )
wxASSERT( g_CurrentTrackSegment==NULL ); wxASSERT( g_CurrentTrackSegment==NULL );
wxASSERT( g_CurrentTrackList.GetCount()==0 ); wxASSERT( g_CurrentTrackList.GetCount()==0 );
if( g_HightLigt_Status ) if( g_HighLight_Status )
Hight_Light( DC ); High_Light( DC );
g_HightLigth_NetCode = OldNetCodeSurbrillance; g_HighLight_NetCode = OldNetCodeSurbrillance;
if( OldEtatSurbrillance ) if( OldEtatSurbrillance )
Hight_Light( DC ); High_Light( DC );
DrawPanel->ManageCurseur = NULL; DrawPanel->ManageCurseur = NULL;
DrawPanel->ForceCloseManageCurseur = NULL; DrawPanel->ForceCloseManageCurseur = NULL;

View File

@ -175,7 +175,7 @@ bool WinEDA_PcbFrame::Clear_Pcb( bool aQuery )
GetScreen()->Init(); GetScreen()->Init();
GetScreen()->SetGrid( gridsize ); GetScreen()->SetGrid( gridsize );
g_HightLigt_Status = 0; g_HighLight_Status = 0;
// Enable all layers (SetCopperLayerCount() will adjust the copper layers enabled) // Enable all layers (SetCopperLayerCount() will adjust the copper layers enabled)
GetBoard()->SetEnabledLayers(ALL_LAYERS); GetBoard()->SetEnabledLayers(ALL_LAYERS);

View File

@ -29,8 +29,8 @@ static bool InitialiseDragParameters();
static wxPoint PosInit, s_LastPos; static wxPoint PosInit, s_LastPos;
static TRACK* NewTrack; /* New track or track being moved. */ static TRACK* NewTrack; /* New track or track being moved. */
static int NbPtNewTrack; static int NbPtNewTrack;
static int Old_HightLigth_NetCode; static int Old_HighLigth_NetCode;
static bool Old_HightLigt_Status; static bool Old_HighLigt_Status;
static double s_StartSegmentSlope, s_EndSegmentSlope, static double s_StartSegmentSlope, s_EndSegmentSlope,
s_MovingSegmentSlope, s_MovingSegmentSlope,
s_StartSegment_Yorg, s_EndSegment_Yorg, s_StartSegment_Yorg, s_EndSegment_Yorg,
@ -61,11 +61,11 @@ static void Abort_MoveTrack( WinEDA_DrawPanel* Panel, wxDC* DC )
Panel->ManageCurseur( Panel, DC, true ); Panel->ManageCurseur( Panel, DC, true );
Panel->GetScreen()->m_Curseur = oldpos; Panel->GetScreen()->m_Curseur = oldpos;
g_HightLigt_Status = FALSE; g_HighLight_Status = FALSE;
( (WinEDA_PcbFrame*) Panel->GetParent() )->GetBoard()->DrawHighLight( ( (WinEDA_PcbFrame*) Panel->GetParent() )->GetBoard()->DrawHighLight(
Panel, Panel,
DC, DC,
g_HightLigth_NetCode ); g_HighLight_NetCode );
if( NewTrack ) if( NewTrack )
{ {
@ -123,13 +123,13 @@ static void Abort_MoveTrack( WinEDA_DrawPanel* Panel, wxDC* DC )
// Clear the undo picker list: // Clear the undo picker list:
s_ItemsListPicker.ClearListAndDeleteItems(); s_ItemsListPicker.ClearListAndDeleteItems();
g_HightLigth_NetCode = Old_HightLigth_NetCode; g_HighLight_NetCode = Old_HighLigth_NetCode;
g_HightLigt_Status = Old_HightLigt_Status; g_HighLight_Status = Old_HighLigt_Status;
if( g_HightLigt_Status ) if( g_HighLight_Status )
( (WinEDA_PcbFrame*) Panel->GetParent() )->GetBoard()->DrawHighLight( ( (WinEDA_PcbFrame*) Panel->GetParent() )->GetBoard()->DrawHighLight(
Panel, Panel,
DC, DC,
g_HightLigth_NetCode ); g_HighLight_NetCode );
EraseDragListe(); EraseDragListe();
} }
@ -647,10 +647,10 @@ void WinEDA_PcbFrame::Start_MoveOneNodeOrSegment( TRACK* track,
EraseDragListe(); EraseDragListe();
/* Change highlighted net: the new one will be highlighted */ /* Change highlighted net: the new one will be highlighted */
Old_HightLigt_Status = g_HightLigt_Status; Old_HighLigt_Status = g_HighLight_Status;
Old_HightLigth_NetCode = g_HightLigth_NetCode; Old_HighLigth_NetCode = g_HighLight_NetCode;
if( g_HightLigt_Status ) if( g_HighLight_Status )
Hight_Light( DC ); High_Light( DC );
PosInit = GetScreen()->m_Curseur; PosInit = GetScreen()->m_Curseur;
if( track->Type() == TYPE_VIA ) if( track->Type() == TYPE_VIA )
@ -722,10 +722,10 @@ void WinEDA_PcbFrame::Start_MoveOneNodeOrSegment( TRACK* track,
DrawPanel->ManageCurseur = Show_MoveNode; DrawPanel->ManageCurseur = Show_MoveNode;
DrawPanel->ForceCloseManageCurseur = Abort_MoveTrack; DrawPanel->ForceCloseManageCurseur = Abort_MoveTrack;
g_HightLigth_NetCode = track->GetNet(); g_HighLight_NetCode = track->GetNet();
g_HightLigt_Status = true; g_HighLight_Status = true;
GetBoard()->DrawHighLight( DrawPanel, DC, g_HightLigth_NetCode ); GetBoard()->DrawHighLight( DrawPanel, DC, g_HighLight_NetCode );
DrawPanel->ManageCurseur( DrawPanel, DC, true ); DrawPanel->ManageCurseur( DrawPanel, DC, true );
} }
@ -891,10 +891,10 @@ void WinEDA_PcbFrame::Start_DragTrackSegmentAndKeepSlope( TRACK* track,
s_EndSegmentPresent = FALSE; s_EndSegmentPresent = FALSE;
/* Change high light net: the new one will be highlighted */ /* Change high light net: the new one will be highlighted */
Old_HightLigt_Status = g_HightLigt_Status; Old_HighLigt_Status = g_HighLight_Status;
Old_HightLigth_NetCode = g_HightLigth_NetCode; Old_HighLigth_NetCode = g_HighLight_NetCode;
if( g_HightLigt_Status ) if( g_HighLight_Status )
Hight_Light( DC ); High_Light( DC );
EraseDragListe(); EraseDragListe();
@ -928,9 +928,9 @@ void WinEDA_PcbFrame::Start_DragTrackSegmentAndKeepSlope( TRACK* track,
DrawPanel->ManageCurseur = Show_Drag_Track_Segment_With_Cte_Slope; DrawPanel->ManageCurseur = Show_Drag_Track_Segment_With_Cte_Slope;
DrawPanel->ForceCloseManageCurseur = Abort_MoveTrack; DrawPanel->ForceCloseManageCurseur = Abort_MoveTrack;
g_HightLigth_NetCode = track->GetNet(); g_HighLight_NetCode = track->GetNet();
g_HightLigt_Status = true; g_HighLight_Status = true;
GetBoard()->DrawHighLight( DrawPanel, DC, g_HightLigth_NetCode ); GetBoard()->DrawHighLight( DrawPanel, DC, g_HighLight_NetCode );
// Prepare the Undo command // Prepare the Undo command
DRAG_SEGM* pt_drag = g_DragSegmentList; DRAG_SEGM* pt_drag = g_DragSegmentList;

View File

@ -38,7 +38,7 @@ bool g_Raccord_45_Auto = true;
bool Track_45_Only; bool Track_45_Only;
bool Segments_45_Only; bool Segments_45_Only;
bool g_TwoSegmentTrackBuild = true; bool g_TwoSegmentTrackBuild = true;
bool g_HightLigt_Status; bool g_HighLight_Status;
extern PARAM_CFG_BASE* ParamCfgList[]; extern PARAM_CFG_BASE* ParamCfgList[];
int Angle_Rot_Module; int Angle_Rot_Module;
@ -49,7 +49,7 @@ int Route_Layer_BOTTOM;
int g_MaxLinksShowed; int g_MaxLinksShowed;
int g_MagneticPadOption = capture_cursor_in_track_tool; int g_MagneticPadOption = capture_cursor_in_track_tool;
int g_MagneticTrackOption = capture_cursor_in_track_tool; int g_MagneticTrackOption = capture_cursor_in_track_tool;
int g_HightLigth_NetCode = -1; int g_HighLight_NetCode = -1;
wxSize ModuleTextSize; /* Default footprint texts size */ wxSize ModuleTextSize; /* Default footprint texts size */
wxPoint g_Offset_Module; /* Offset de trace du modul en depl */ wxPoint g_Offset_Module; /* Offset de trace du modul en depl */

View File

@ -102,9 +102,9 @@ extern bool g_TwoSegmentTrackBuild;
extern int g_MagneticPadOption; extern int g_MagneticPadOption;
extern int g_MagneticTrackOption; extern int g_MagneticTrackOption;
/* Variables to handle hightlight nets */ /* Variables to handle highlight nets */
extern bool g_HightLigt_Status; extern bool g_HighLight_Status;
extern int g_HightLigth_NetCode; extern int g_HighLight_NetCode;
extern wxPoint g_Offset_Module; /* Offset de trace du modul en depl */ extern wxPoint g_Offset_Module; /* Offset de trace du modul en depl */

View File

@ -242,6 +242,16 @@ enum pcbnew_ids
ID_PCB_MUWAVE_TOOL_FUNCTION_SHAPE_CMD, ID_PCB_MUWAVE_TOOL_FUNCTION_SHAPE_CMD,
ID_PCB_MUWAVE_END_CMD, ID_PCB_MUWAVE_END_CMD,
ID_DRC_CONTROL,
ID_PCB_GLOBAL_DELETE,
ID_TRACK_BUTT,
ID_PCB_ZONES_BUTT,
ID_PCB_DELETE_ITEM_BUTT,
ID_POPUP_PCB_DELETE_TRACKSEG,
ID_TOOLBARH_PCB_SELECT_LAYER,
ID_PCB_DISPLAY_OPTIONS_SETUP,
// ID used in module editor:
ID_MODEDIT_CHECK, ID_MODEDIT_CHECK,
ID_MODEDIT_SELECT_CURRENT_LIB, ID_MODEDIT_SELECT_CURRENT_LIB,
ID_MODEDIT_SAVE_LIBMODULE, ID_MODEDIT_SAVE_LIBMODULE,

View File

@ -76,11 +76,11 @@ void WinEDA_PcbFrame::ListNetsAndSelect( wxCommandEvent& event )
{ {
INSTALL_DC( dc, DrawPanel ); INSTALL_DC( dc, DrawPanel );
if( g_HightLigt_Status ) if( g_HighLight_Status )
Hight_Light( &dc ); High_Light( &dc );
g_HightLigth_NetCode = netcode; g_HighLight_NetCode = netcode;
Hight_Light( &dc ); High_Light( &dc );
} }
} }
@ -90,8 +90,8 @@ void WinEDA_PcbFrame::ListNetsAndSelect( wxCommandEvent& event )
*/ */
int WinEDA_PcbFrame::Select_High_Light( wxDC* DC ) int WinEDA_PcbFrame::Select_High_Light( wxDC* DC )
{ {
if( g_HightLigt_Status ) if( g_HighLight_Status )
Hight_Light( DC ); High_Light( DC );
// use this scheme because a pad is a higher priority than a track in the // use this scheme because a pad is a higher priority than a track in the
// search, and finding a pad, instead of a track on a pad, // search, and finding a pad, instead of a track on a pad,
@ -111,10 +111,10 @@ int WinEDA_PcbFrame::Select_High_Light( wxDC* DC )
switch( item->Type() ) switch( item->Type() )
{ {
case TYPE_PAD: case TYPE_PAD:
g_HightLigth_NetCode = ( (D_PAD*) item )->GetNet(); g_HighLight_NetCode = ( (D_PAD*) item )->GetNet();
Hight_Light( DC ); High_Light( DC );
SendMessageToEESCHEMA( item ); SendMessageToEESCHEMA( item );
return g_HightLigth_NetCode; return g_HighLight_NetCode;
case TYPE_TRACK: case TYPE_TRACK:
case TYPE_VIA: case TYPE_VIA:
@ -122,14 +122,14 @@ int WinEDA_PcbFrame::Select_High_Light( wxDC* DC )
// since these classes are all derived from TRACK, use a common // since these classes are all derived from TRACK, use a common
// GetNet() function: // GetNet() function:
g_HightLigth_NetCode = ( (TRACK*) item )->GetNet(); g_HighLight_NetCode = ( (TRACK*) item )->GetNet();
Hight_Light( DC ); High_Light( DC );
return g_HightLigth_NetCode; return g_HighLight_NetCode;
case TYPE_ZONE_CONTAINER: case TYPE_ZONE_CONTAINER:
g_HightLigth_NetCode = ( (ZONE_CONTAINER*) item )->GetNet(); g_HighLight_NetCode = ( (ZONE_CONTAINER*) item )->GetNet();
Hight_Light( DC ); High_Light( DC );
return g_HightLigth_NetCode; return g_HighLight_NetCode;
default: default:
; // until somebody changes GENERAL_COLLECTOR::PadsOrTracks, ; // until somebody changes GENERAL_COLLECTOR::PadsOrTracks,
@ -146,9 +146,9 @@ int WinEDA_PcbFrame::Select_High_Light( wxDC* DC )
* *
* Show or removes the net at the current cursor position. * Show or removes the net at the current cursor position.
*/ */
void WinEDA_PcbFrame::Hight_Light( wxDC* DC ) void WinEDA_PcbFrame::High_Light( wxDC* DC )
{ {
g_HightLigt_Status = !g_HightLigt_Status; g_HighLight_Status = !g_HighLight_Status;
GetBoard()->DrawHighLight( DrawPanel, DC, g_HightLigth_NetCode ); GetBoard()->DrawHighLight( DrawPanel, DC, g_HighLight_NetCode );
} }

View File

@ -377,14 +377,8 @@ void WinEDA_PcbFrame::ReCreateOptToolbar()
wxITEM_CHECK ); wxITEM_CHECK );
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_HIGH_CONTRAST_MODE, m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_HIGH_CONTRAST_MODE,
DisplayOpt.ContrastModeDisplay ); DisplayOpt.ContrastModeDisplay );
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_INVISIBLE_TEXT_MODE,
wxEmptyString,
wxBitmap( invisible_text_xpm ),
_( "Show invisible text" ),
wxITEM_CHECK );
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_INVISIBLE_TEXT_MODE,
g_DesignSettings.IsElementVisible( MOD_TEXT_INVISIBLE ));
// Tools to show/hide toolbars:
m_OptionsToolBar->AddSeparator(); m_OptionsToolBar->AddSeparator();
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_MANAGE_LAYERS_VERTICAL_TOOLBAR, m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_MANAGE_LAYERS_VERTICAL_TOOLBAR,
wxEmptyString, wxEmptyString,
@ -420,7 +414,7 @@ void WinEDA_PcbFrame::ReCreateVToolbar()
m_VToolBar->AddSeparator(); m_VToolBar->AddSeparator();
m_VToolBar->AddTool( ID_PCB_HIGHLIGHT_BUTT, wxEmptyString, m_VToolBar->AddTool( ID_PCB_HIGHLIGHT_BUTT, wxEmptyString,
wxBitmap( net_hightlight_xpm ), _( "Highlight net" ), wxBitmap( net_highlight_xpm ), _( "Highlight net" ),
wxITEM_CHECK ); wxITEM_CHECK );
m_VToolBar->AddTool( ID_PCB_SHOW_1_RATSNEST_BUTT, wxEmptyString, m_VToolBar->AddTool( ID_PCB_SHOW_1_RATSNEST_BUTT, wxEmptyString,
@ -712,19 +706,29 @@ WinEDAChoiceBox* WinEDA_PcbFrame::ReCreateLayerBox( WinEDA_Toolbar* parent )
parent->AddControl( m_SelLayerBox ); parent->AddControl( m_SelLayerBox );
} }
/*
int layer_mask = g_TabAllCopperLayerMask[g_DesignSettings.m_CopperLayerCount - 1];
layer_mask |= ALL_NO_CU_LAYERS;
*/
int layer_mask = g_DesignSettings.GetEnabledLayers(); int layer_mask = g_DesignSettings.GetEnabledLayers();
unsigned length = 0; unsigned length = 0;
m_SelLayerBox->Clear(); m_SelLayerBox->Clear();
for( int layer=0, listNdx=0; layer <= EDGE_N; layer++ ) static int layerOrder_for_display[NB_LAYERS] = {
LAYER_N_FRONT,
LAYER_N_15, LAYER_N_14, LAYER_N_13, LAYER_N_12,
LAYER_N_11, LAYER_N_10, LAYER_N_9, LAYER_N_8,
LAYER_N_7, LAYER_N_6, LAYER_N_5, LAYER_N_4,
LAYER_N_3, LAYER_N_2,
LAYER_N_BACK,
ADHESIVE_N_FRONT, ADHESIVE_N_BACK,
SOLDERPASTE_N_FRONT, SOLDERPASTE_N_BACK,
SILKSCREEN_N_FRONT, SILKSCREEN_N_BACK,
SOLDERMASK_N_FRONT, SOLDERMASK_N_BACK,
DRAW_N, COMMENT_N,
ECO1_N, ECO2_N,
EDGE_N
};
for( int idx=0, listNdx=0; idx <= EDGE_N; idx++ )
{ {
int layer = layerOrder_for_display[idx];
// List to append hotkeys in layer box selection // List to append hotkeys in layer box selection
static const int HK_SwitchLayer[EDGE_N + 1] = { static const int HK_SwitchLayer[EDGE_N + 1] = {
HK_SWITCH_LAYER_TO_COPPER, HK_SWITCH_LAYER_TO_COPPER,

View File

@ -266,13 +266,6 @@ void WinEDA_PcbFrame::SetToolbars()
_( "Normal contrast display mode" ) : _( "Normal contrast display mode" ) :
_( "High contrast display mode" ) ); _( "High contrast display mode" ) );
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_INVISIBLE_TEXT_MODE,
g_DesignSettings.IsElementVisible( MOD_TEXT_INVISIBLE ) );
m_OptionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_SHOW_INVISIBLE_TEXT_MODE,
g_DesignSettings.IsElementVisible( MOD_TEXT_INVISIBLE ) ?
_( "Hide invisible text" ) :
_( "Show invisible text" ) );
#if !defined(KICAD_AUIMANAGER) #if !defined(KICAD_AUIMANAGER)
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR1, m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR1,
(m_AuxVToolBar && m_AuxVToolBar->IsShown()) ? true : false ); (m_AuxVToolBar && m_AuxVToolBar->IsShown()) ? true : false );

View File

@ -172,8 +172,8 @@ void BOARD::Draw( WinEDA_DrawPanel* aPanel, wxDC* DC,
} }
// @todo: this high-light functionality could be built into me. // @todo: this high-light functionality could be built into me.
if( g_HightLigt_Status ) if( g_HighLight_Status )
DrawHighLight( aPanel, DC, g_HightLigth_NetCode ); DrawHighLight( aPanel, DC, g_HighLight_NetCode );
// draw the BOARD's markers last, otherwise the high light will erase // draw the BOARD's markers last, otherwise the high light will erase
// any marker on a pad // any marker on a pad
@ -188,7 +188,7 @@ void BOARD::DrawHighLight( WinEDA_DrawPanel* aDrawPanel, wxDC* DC, int aNetCode
{ {
int draw_mode; int draw_mode;
if( g_HightLigt_Status ) if( g_HighLight_Status )
draw_mode = GR_SURBRILL | GR_OR; draw_mode = GR_SURBRILL | GR_OR;
else else
draw_mode = GR_AND | GR_SURBRILL; draw_mode = GR_AND | GR_SURBRILL;

View File

@ -170,14 +170,14 @@ void WinEDA_PcbFrame::Start_Move_Zone_Corner( wxDC* DC, ZONE_CONTAINER* zone_con
{ {
if( zone_container->IsOnCopperLayer() ) /* Show the Net */ if( zone_container->IsOnCopperLayer() ) /* Show the Net */
{ {
if( g_HightLigt_Status && DC ) if( g_HighLight_Status && DC )
{ {
Hight_Light( DC ); // Remove old hightlight selection High_Light( DC ); // Remove old hightlight selection
} }
g_HightLigth_NetCode = g_Zone_Default_Setting.m_NetcodeSelection = zone_container->GetNet(); g_HighLight_NetCode = g_Zone_Default_Setting.m_NetcodeSelection = zone_container->GetNet();
if( DC ) if( DC )
Hight_Light( DC ); High_Light( DC );
} }
@ -244,13 +244,13 @@ void WinEDA_PcbFrame::Start_Move_Zone_Outlines( wxDC* DC, ZONE_CONTAINER* zone_c
/* Show the Net */ /* Show the Net */
if( zone_container->IsOnCopperLayer() ) /* Show the Net */ if( zone_container->IsOnCopperLayer() ) /* Show the Net */
{ {
if( g_HightLigt_Status ) if( g_HighLight_Status )
{ {
Hight_Light( DC ); // Remove old hightlight selection High_Light( DC ); // Remove old hightlight selection
} }
g_HightLigth_NetCode = g_Zone_Default_Setting.m_NetcodeSelection = zone_container->GetNet(); g_HighLight_NetCode = g_Zone_Default_Setting.m_NetcodeSelection = zone_container->GetNet();
Hight_Light( DC ); High_Light( DC );
} }
s_PickedList.ClearListAndDeleteItems(); s_PickedList.ClearListAndDeleteItems();
@ -506,9 +506,9 @@ int WinEDA_PcbFrame::Begin_Zone( wxDC* DC )
DrawPanel->m_IgnoreMouseEvents = TRUE; DrawPanel->m_IgnoreMouseEvents = TRUE;
if( zone->IsOnCopperLayer() ) if( zone->IsOnCopperLayer() )
{ // Put a zone on a copper layer { // Put a zone on a copper layer
if ( g_HightLigth_NetCode ) if ( g_HighLight_NetCode )
{ {
g_Zone_Default_Setting.m_NetcodeSelection = g_HightLigth_NetCode; g_Zone_Default_Setting.m_NetcodeSelection = g_HighLight_NetCode;
zone->SetNet( g_Zone_Default_Setting.m_NetcodeSelection ); zone->SetNet( g_Zone_Default_Setting.m_NetcodeSelection );
zone->SetNetNameFromNetCode( ); zone->SetNetNameFromNetCode( );
} }
@ -549,13 +549,13 @@ int WinEDA_PcbFrame::Begin_Zone( wxDC* DC )
{ {
if( s_CurrentZone ) if( s_CurrentZone )
g_Zone_Default_Setting.m_NetcodeSelection = s_CurrentZone->GetNet(); g_Zone_Default_Setting.m_NetcodeSelection = s_CurrentZone->GetNet();
if( g_HightLigt_Status ) if( g_HighLight_Status )
{ {
Hight_Light( DC ); // Remove old hightlight selection High_Light( DC ); // Remove old hightlight selection
} }
g_HightLigth_NetCode = g_Zone_Default_Setting.m_NetcodeSelection; g_HighLight_NetCode = g_Zone_Default_Setting.m_NetcodeSelection;
Hight_Light( DC ); High_Light( DC );
} }
if( !s_AddCutoutToCurrentZone ) if( !s_AddCutoutToCurrentZone )
s_CurrentZone = NULL; // the zone is used only once ("add similar zone" command) s_CurrentZone = NULL; // the zone is used only once ("add similar zone" command)