++ 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:
parent
c45d8cd4d2
commit
96a9769f6c
|
@ -4,6 +4,17 @@ KiCad ChangeLog 2010
|
|||
Please add newer entries at the top, list the date and your name with
|
||||
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>
|
||||
================================================================================
|
||||
++pcbnew's PCB_LAYER_WIDGET
|
||||
|
|
|
@ -247,7 +247,6 @@ set(BITMAP_SRCS
|
|||
mw_Add_Stub.xpm
|
||||
mw_toolbar.xpm
|
||||
Net_HighLight.xpm
|
||||
net_hightlight.xpm
|
||||
netlist.xpm
|
||||
Net_Locked.xpm
|
||||
Net_UnLocked.xpm
|
||||
|
|
|
@ -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
|
|
@ -157,6 +157,8 @@ void WinEDA_ViewlibFrame::ReCreateHToolbar()
|
|||
|
||||
m_HToolBar->EnableTool( ID_LIBVIEW_VIEWDOC,
|
||||
entry && ( entry->GetDocFileName() != wxEmptyString ) );
|
||||
|
||||
m_HToolBar->Refresh();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include "pcbplot.h"
|
||||
#include "protos.h"
|
||||
#include "kicad_device_context.h"
|
||||
#include "gerbview_id.h"
|
||||
|
||||
|
||||
/* Process the command triggered by the left button of the mouse when a tool
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#include "pcbplot.h"
|
||||
#include "bitmaps.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( ID_GEN_PRINT, WinEDA_GerberFrame::ToPrinter )
|
||||
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,
|
||||
WinEDA_GerberFrame::Process_Special_Functions )
|
||||
|
||||
|
@ -96,8 +96,6 @@ BEGIN_EVENT_TABLE( WinEDA_GerberFrame, WinEDA_BasePcbFrame )
|
|||
|
||||
// Vertical toolbar:
|
||||
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,
|
||||
WinEDA_GerberFrame::Process_Special_Functions )
|
||||
|
||||
|
|
|
@ -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__ */
|
|
@ -10,6 +10,7 @@
|
|||
#include "pcbplot.h"
|
||||
#include "protos.h"
|
||||
#include "bitmaps.h"
|
||||
#include "gerbview_id.h"
|
||||
#include "hotkeys.h"
|
||||
|
||||
|
||||
|
|
|
@ -238,7 +238,6 @@ extern const char* mw_Add_stub_arc_xpm[];
|
|||
extern const char* mw_Add_Stub_xpm[];
|
||||
extern const char* mw_toolbar_xpm[];
|
||||
extern const char* net_highlight_xpm[];
|
||||
extern const char* net_hightlight_xpm[];
|
||||
extern const char* netlist_xpm[];
|
||||
extern const char* net_locked_xpm[];
|
||||
extern const char* net_unlocked_xpm[];
|
||||
|
|
11
include/id.h
11
include/id.h
|
@ -235,19 +235,8 @@ enum main_id
|
|||
ID_TB_OPTIONS_SHOW_HIGH_CONTRAST_MODE,
|
||||
ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR1,
|
||||
ID_TB_OPTIONS_SHOW_POLYGONS_SKETCH,
|
||||
ID_TB_OPTIONS_SHOW_INVISIBLE_TEXT_MODE,
|
||||
|
||||
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
|
||||
};
|
||||
|
||||
|
|
|
@ -505,7 +505,7 @@ public:
|
|||
|
||||
// Highlight functions:
|
||||
int Select_High_Light( wxDC* DC );
|
||||
void Hight_Light( wxDC* DC );
|
||||
void High_Light( wxDC* DC );
|
||||
|
||||
// Track and via edition:
|
||||
void Via_Edit_Control( wxCommandEvent& event );
|
||||
|
|
Binary file not shown.
1664
internat/fr/kicad.po
1664
internat/fr/kicad.po
File diff suppressed because it is too large
Load Diff
|
@ -411,7 +411,7 @@ public:
|
|||
* Function DrawHighLight
|
||||
* 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
|
||||
* current value of global g_HightLigt_Status
|
||||
* current value of global g_HighLight_Status
|
||||
* @param aDrawPanel is needed for the clipping support.
|
||||
* @param aNetCode is the net number to highlight or to dim.
|
||||
*/
|
||||
|
|
|
@ -93,13 +93,13 @@ void RemoteCommand( const char* cmdline )
|
|||
|
||||
if( netcode > 0 ) /* highlight the pad net*/
|
||||
{
|
||||
g_HightLigt_Status = 1;
|
||||
g_HightLigth_NetCode = netcode;
|
||||
g_HighLight_Status = 1;
|
||||
g_HighLight_NetCode = netcode;
|
||||
}
|
||||
else
|
||||
{
|
||||
g_HightLigt_Status = 0;
|
||||
g_HightLigth_NetCode = 0;
|
||||
g_HighLight_Status = 0;
|
||||
g_HighLight_NetCode = 0;
|
||||
}
|
||||
|
||||
if( module == NULL )
|
||||
|
|
|
@ -89,8 +89,8 @@ TRACK* WinEDA_PcbFrame::Delete_Segment( wxDC* DC, TRACK* aTrack )
|
|||
DrawPanel->ManageCurseur = NULL;
|
||||
DrawPanel->ForceCloseManageCurseur = NULL;
|
||||
|
||||
if( g_HightLigt_Status )
|
||||
Hight_Light( DC );
|
||||
if( g_HighLight_Status )
|
||||
High_Light( DC );
|
||||
|
||||
SetCurItem( NULL );
|
||||
return NULL;
|
||||
|
|
|
@ -249,12 +249,6 @@ void WinEDA_PcbFrame::OnSelectOptionToolbar( wxCommandEvent& event )
|
|||
DrawPanel->Refresh();
|
||||
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:
|
||||
m_show_microwave_tools = m_OptionsToolBar->GetToolState( id );
|
||||
#if !defined(KICAD_AUIMANAGER)
|
||||
|
|
|
@ -238,8 +238,8 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
|
|||
SetToolID( id, wxCURSOR_PENCIL, _( "Add Zones" ) );
|
||||
if( DisplayOpt.DisplayZonesMode != 0 )
|
||||
DisplayInfoMessage( this, _( "Warning: Display Zone is OFF!!!" ) );
|
||||
if( !g_HightLigt_Status && (g_HightLigth_NetCode > 0 ) )
|
||||
Hight_Light( &dc );
|
||||
if( !g_HighLight_Status && (g_HighLight_NetCode > 0 ) )
|
||||
High_Light( &dc );
|
||||
break;
|
||||
|
||||
case ID_PCB_MIRE_BUTT:
|
||||
|
|
|
@ -68,6 +68,7 @@ void WinEDA_PcbFrame::ExChange_Track_Layer( TRACK* pt_segm, wxDC* DC )
|
|||
l1 = Route_Layer_TOP; l2 = Route_Layer_BOTTOM;
|
||||
|
||||
pt_track = Marque_Une_Piste( GetBoard(), pt_segm, &nb_segm, NULL, true );
|
||||
if ( DC )
|
||||
Trace_Une_Piste( DrawPanel, DC, pt_track, nb_segm, GR_XOR );
|
||||
|
||||
/* Clear the BUSY flag and backup member. Param layer original. */
|
||||
|
@ -101,6 +102,7 @@ void WinEDA_PcbFrame::ExChange_Track_Layer( TRACK* pt_segm, wxDC* DC )
|
|||
pt_segm->SetLayer( pt_segm->m_Param );
|
||||
}
|
||||
|
||||
if( DC )
|
||||
Trace_Une_Piste( DrawPanel, DC, pt_track, nb_segm, GR_OR );
|
||||
DisplayError( this, _( "Drc error, canceled" ), 10 );
|
||||
return;
|
||||
|
@ -180,7 +182,7 @@ bool WinEDA_PcbFrame::Other_Layer_Route( TRACK* aTrack, wxDC* DC )
|
|||
via->m_Flags = IS_NEW;
|
||||
via->m_Shape = g_DesignSettings.m_CurrentViaType;
|
||||
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;
|
||||
int old_layer = getActiveLayer();
|
||||
|
||||
|
|
|
@ -42,12 +42,12 @@ static void Exit_Editrack( WinEDA_DrawPanel* Panel, wxDC* DC )
|
|||
{
|
||||
/* Erase the current drawing */
|
||||
ShowNewTrackWhenMovingCursor( Panel, DC, false );
|
||||
if( g_HightLigt_Status )
|
||||
frame->Hight_Light( DC );
|
||||
if( g_HighLight_Status )
|
||||
frame->High_Light( DC );
|
||||
|
||||
g_HightLigth_NetCode = OldNetCodeSurbrillance;
|
||||
g_HighLight_NetCode = OldNetCodeSurbrillance;
|
||||
if( OldEtatSurbrillance )
|
||||
frame->Hight_Light( DC );
|
||||
frame->High_Light( DC );
|
||||
|
||||
frame->MsgPanel->EraseMsgBox();
|
||||
|
||||
|
@ -98,16 +98,16 @@ TRACK* WinEDA_PcbFrame::Begin_Route( TRACK* aTrack, wxDC* DC )
|
|||
// but...
|
||||
|
||||
/* erase old highlight */
|
||||
OldNetCodeSurbrillance = g_HightLigth_NetCode;
|
||||
OldEtatSurbrillance = g_HightLigt_Status;
|
||||
OldNetCodeSurbrillance = g_HighLight_NetCode;
|
||||
OldEtatSurbrillance = g_HighLight_Status;
|
||||
|
||||
if( g_HightLigt_Status )
|
||||
Hight_Light( DC );
|
||||
if( g_HighLight_Status )
|
||||
High_Light( DC );
|
||||
|
||||
g_CurrentTrackList.PushBack( new TRACK( GetBoard() ) );
|
||||
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
|
||||
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 */
|
||||
pos = pt_pad->m_Pos;
|
||||
g_HightLigth_NetCode = pt_pad->GetNet();
|
||||
g_HighLight_NetCode = pt_pad->GetNet();
|
||||
}
|
||||
else /* A track segment is found */
|
||||
{
|
||||
TrackOnStartPoint = (TRACK*) LockPoint;
|
||||
g_HightLigth_NetCode = TrackOnStartPoint->GetNet();
|
||||
g_HighLight_NetCode = TrackOnStartPoint->GetNet();
|
||||
CreateLockPoint( pos,
|
||||
TrackOnStartPoint,
|
||||
NULL,
|
||||
|
@ -140,7 +140,7 @@ TRACK* WinEDA_PcbFrame::Begin_Route( TRACK* aTrack, wxDC* DC )
|
|||
GetScreen()->
|
||||
m_Active_Layer );
|
||||
if( zone )
|
||||
g_HightLigth_NetCode = zone->GetNet();
|
||||
g_HighLight_NetCode = zone->GetNet();
|
||||
}
|
||||
|
||||
D( g_CurrentTrackList.VerifyListIntegrity(); );
|
||||
|
@ -149,10 +149,10 @@ TRACK* WinEDA_PcbFrame::Begin_Route( TRACK* aTrack, wxDC* DC )
|
|||
|
||||
D( g_CurrentTrackList.VerifyListIntegrity(); );
|
||||
|
||||
Hight_Light( DC );
|
||||
High_Light( DC );
|
||||
|
||||
// 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() );
|
||||
m_TrackAndViasSizesList_Changed = true;
|
||||
AuxiliaryToolBar_Update_UI();
|
||||
|
@ -474,7 +474,7 @@ void WinEDA_PcbFrame::End_Route( TRACK* aTrack, wxDC* DC )
|
|||
* possibly create an anchor. */
|
||||
{
|
||||
TRACK* adr_buf = (TRACK*) LockPoint;
|
||||
g_HightLigth_NetCode = adr_buf->GetNet();
|
||||
g_HighLight_NetCode = adr_buf->GetNet();
|
||||
|
||||
/* Possible establishment of a hanging point. */
|
||||
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_CurrentTrackList.GetCount()==0 );
|
||||
|
||||
if( g_HightLigt_Status )
|
||||
Hight_Light( DC );
|
||||
if( g_HighLight_Status )
|
||||
High_Light( DC );
|
||||
|
||||
g_HightLigth_NetCode = OldNetCodeSurbrillance;
|
||||
g_HighLight_NetCode = OldNetCodeSurbrillance;
|
||||
if( OldEtatSurbrillance )
|
||||
Hight_Light( DC );
|
||||
High_Light( DC );
|
||||
|
||||
DrawPanel->ManageCurseur = NULL;
|
||||
DrawPanel->ForceCloseManageCurseur = NULL;
|
||||
|
|
|
@ -175,7 +175,7 @@ bool WinEDA_PcbFrame::Clear_Pcb( bool aQuery )
|
|||
GetScreen()->Init();
|
||||
GetScreen()->SetGrid( gridsize );
|
||||
|
||||
g_HightLigt_Status = 0;
|
||||
g_HighLight_Status = 0;
|
||||
|
||||
// Enable all layers (SetCopperLayerCount() will adjust the copper layers enabled)
|
||||
GetBoard()->SetEnabledLayers(ALL_LAYERS);
|
||||
|
|
|
@ -29,8 +29,8 @@ static bool InitialiseDragParameters();
|
|||
static wxPoint PosInit, s_LastPos;
|
||||
static TRACK* NewTrack; /* New track or track being moved. */
|
||||
static int NbPtNewTrack;
|
||||
static int Old_HightLigth_NetCode;
|
||||
static bool Old_HightLigt_Status;
|
||||
static int Old_HighLigth_NetCode;
|
||||
static bool Old_HighLigt_Status;
|
||||
static double s_StartSegmentSlope, s_EndSegmentSlope,
|
||||
s_MovingSegmentSlope,
|
||||
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->GetScreen()->m_Curseur = oldpos;
|
||||
g_HightLigt_Status = FALSE;
|
||||
g_HighLight_Status = FALSE;
|
||||
( (WinEDA_PcbFrame*) Panel->GetParent() )->GetBoard()->DrawHighLight(
|
||||
Panel,
|
||||
DC,
|
||||
g_HightLigth_NetCode );
|
||||
g_HighLight_NetCode );
|
||||
|
||||
if( NewTrack )
|
||||
{
|
||||
|
@ -123,13 +123,13 @@ static void Abort_MoveTrack( WinEDA_DrawPanel* Panel, wxDC* DC )
|
|||
// Clear the undo picker list:
|
||||
s_ItemsListPicker.ClearListAndDeleteItems();
|
||||
|
||||
g_HightLigth_NetCode = Old_HightLigth_NetCode;
|
||||
g_HightLigt_Status = Old_HightLigt_Status;
|
||||
if( g_HightLigt_Status )
|
||||
g_HighLight_NetCode = Old_HighLigth_NetCode;
|
||||
g_HighLight_Status = Old_HighLigt_Status;
|
||||
if( g_HighLight_Status )
|
||||
( (WinEDA_PcbFrame*) Panel->GetParent() )->GetBoard()->DrawHighLight(
|
||||
Panel,
|
||||
DC,
|
||||
g_HightLigth_NetCode );
|
||||
g_HighLight_NetCode );
|
||||
|
||||
EraseDragListe();
|
||||
}
|
||||
|
@ -647,10 +647,10 @@ void WinEDA_PcbFrame::Start_MoveOneNodeOrSegment( TRACK* track,
|
|||
EraseDragListe();
|
||||
|
||||
/* Change highlighted net: the new one will be highlighted */
|
||||
Old_HightLigt_Status = g_HightLigt_Status;
|
||||
Old_HightLigth_NetCode = g_HightLigth_NetCode;
|
||||
if( g_HightLigt_Status )
|
||||
Hight_Light( DC );
|
||||
Old_HighLigt_Status = g_HighLight_Status;
|
||||
Old_HighLigth_NetCode = g_HighLight_NetCode;
|
||||
if( g_HighLight_Status )
|
||||
High_Light( DC );
|
||||
PosInit = GetScreen()->m_Curseur;
|
||||
|
||||
if( track->Type() == TYPE_VIA )
|
||||
|
@ -722,10 +722,10 @@ void WinEDA_PcbFrame::Start_MoveOneNodeOrSegment( TRACK* track,
|
|||
DrawPanel->ManageCurseur = Show_MoveNode;
|
||||
DrawPanel->ForceCloseManageCurseur = Abort_MoveTrack;
|
||||
|
||||
g_HightLigth_NetCode = track->GetNet();
|
||||
g_HightLigt_Status = true;
|
||||
g_HighLight_NetCode = track->GetNet();
|
||||
g_HighLight_Status = true;
|
||||
|
||||
GetBoard()->DrawHighLight( DrawPanel, DC, g_HightLigth_NetCode );
|
||||
GetBoard()->DrawHighLight( DrawPanel, DC, g_HighLight_NetCode );
|
||||
DrawPanel->ManageCurseur( DrawPanel, DC, true );
|
||||
}
|
||||
|
||||
|
@ -891,10 +891,10 @@ void WinEDA_PcbFrame::Start_DragTrackSegmentAndKeepSlope( TRACK* track,
|
|||
s_EndSegmentPresent = FALSE;
|
||||
|
||||
/* Change high light net: the new one will be highlighted */
|
||||
Old_HightLigt_Status = g_HightLigt_Status;
|
||||
Old_HightLigth_NetCode = g_HightLigth_NetCode;
|
||||
if( g_HightLigt_Status )
|
||||
Hight_Light( DC );
|
||||
Old_HighLigt_Status = g_HighLight_Status;
|
||||
Old_HighLigth_NetCode = g_HighLight_NetCode;
|
||||
if( g_HighLight_Status )
|
||||
High_Light( DC );
|
||||
|
||||
EraseDragListe();
|
||||
|
||||
|
@ -928,9 +928,9 @@ void WinEDA_PcbFrame::Start_DragTrackSegmentAndKeepSlope( TRACK* track,
|
|||
DrawPanel->ManageCurseur = Show_Drag_Track_Segment_With_Cte_Slope;
|
||||
DrawPanel->ForceCloseManageCurseur = Abort_MoveTrack;
|
||||
|
||||
g_HightLigth_NetCode = track->GetNet();
|
||||
g_HightLigt_Status = true;
|
||||
GetBoard()->DrawHighLight( DrawPanel, DC, g_HightLigth_NetCode );
|
||||
g_HighLight_NetCode = track->GetNet();
|
||||
g_HighLight_Status = true;
|
||||
GetBoard()->DrawHighLight( DrawPanel, DC, g_HighLight_NetCode );
|
||||
|
||||
// Prepare the Undo command
|
||||
DRAG_SEGM* pt_drag = g_DragSegmentList;
|
||||
|
|
|
@ -38,7 +38,7 @@ bool g_Raccord_45_Auto = true;
|
|||
bool Track_45_Only;
|
||||
bool Segments_45_Only;
|
||||
bool g_TwoSegmentTrackBuild = true;
|
||||
bool g_HightLigt_Status;
|
||||
bool g_HighLight_Status;
|
||||
extern PARAM_CFG_BASE* ParamCfgList[];
|
||||
|
||||
int Angle_Rot_Module;
|
||||
|
@ -49,7 +49,7 @@ int Route_Layer_BOTTOM;
|
|||
int g_MaxLinksShowed;
|
||||
int g_MagneticPadOption = 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 */
|
||||
wxPoint g_Offset_Module; /* Offset de trace du modul en depl */
|
||||
|
|
|
@ -102,9 +102,9 @@ extern bool g_TwoSegmentTrackBuild;
|
|||
extern int g_MagneticPadOption;
|
||||
extern int g_MagneticTrackOption;
|
||||
|
||||
/* Variables to handle hightlight nets */
|
||||
extern bool g_HightLigt_Status;
|
||||
extern int g_HightLigth_NetCode;
|
||||
/* Variables to handle highlight nets */
|
||||
extern bool g_HighLight_Status;
|
||||
extern int g_HighLight_NetCode;
|
||||
|
||||
extern wxPoint g_Offset_Module; /* Offset de trace du modul en depl */
|
||||
|
||||
|
|
|
@ -242,6 +242,16 @@ enum pcbnew_ids
|
|||
ID_PCB_MUWAVE_TOOL_FUNCTION_SHAPE_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_SELECT_CURRENT_LIB,
|
||||
ID_MODEDIT_SAVE_LIBMODULE,
|
||||
|
|
|
@ -76,11 +76,11 @@ void WinEDA_PcbFrame::ListNetsAndSelect( wxCommandEvent& event )
|
|||
{
|
||||
INSTALL_DC( dc, DrawPanel );
|
||||
|
||||
if( g_HightLigt_Status )
|
||||
Hight_Light( &dc );
|
||||
if( g_HighLight_Status )
|
||||
High_Light( &dc );
|
||||
|
||||
g_HightLigth_NetCode = netcode;
|
||||
Hight_Light( &dc );
|
||||
g_HighLight_NetCode = netcode;
|
||||
High_Light( &dc );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -90,8 +90,8 @@ void WinEDA_PcbFrame::ListNetsAndSelect( wxCommandEvent& event )
|
|||
*/
|
||||
int WinEDA_PcbFrame::Select_High_Light( wxDC* DC )
|
||||
{
|
||||
if( g_HightLigt_Status )
|
||||
Hight_Light( DC );
|
||||
if( g_HighLight_Status )
|
||||
High_Light( DC );
|
||||
|
||||
// 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,
|
||||
|
@ -111,10 +111,10 @@ int WinEDA_PcbFrame::Select_High_Light( wxDC* DC )
|
|||
switch( item->Type() )
|
||||
{
|
||||
case TYPE_PAD:
|
||||
g_HightLigth_NetCode = ( (D_PAD*) item )->GetNet();
|
||||
Hight_Light( DC );
|
||||
g_HighLight_NetCode = ( (D_PAD*) item )->GetNet();
|
||||
High_Light( DC );
|
||||
SendMessageToEESCHEMA( item );
|
||||
return g_HightLigth_NetCode;
|
||||
return g_HighLight_NetCode;
|
||||
|
||||
case TYPE_TRACK:
|
||||
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
|
||||
// GetNet() function:
|
||||
g_HightLigth_NetCode = ( (TRACK*) item )->GetNet();
|
||||
Hight_Light( DC );
|
||||
return g_HightLigth_NetCode;
|
||||
g_HighLight_NetCode = ( (TRACK*) item )->GetNet();
|
||||
High_Light( DC );
|
||||
return g_HighLight_NetCode;
|
||||
|
||||
case TYPE_ZONE_CONTAINER:
|
||||
g_HightLigth_NetCode = ( (ZONE_CONTAINER*) item )->GetNet();
|
||||
Hight_Light( DC );
|
||||
return g_HightLigth_NetCode;
|
||||
g_HighLight_NetCode = ( (ZONE_CONTAINER*) item )->GetNet();
|
||||
High_Light( DC );
|
||||
return g_HighLight_NetCode;
|
||||
|
||||
default:
|
||||
; // 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.
|
||||
*/
|
||||
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 );
|
||||
}
|
||||
|
|
|
@ -377,14 +377,8 @@ void WinEDA_PcbFrame::ReCreateOptToolbar()
|
|||
wxITEM_CHECK );
|
||||
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_HIGH_CONTRAST_MODE,
|
||||
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->AddTool( ID_TB_OPTIONS_SHOW_MANAGE_LAYERS_VERTICAL_TOOLBAR,
|
||||
wxEmptyString,
|
||||
|
@ -420,7 +414,7 @@ void WinEDA_PcbFrame::ReCreateVToolbar()
|
|||
m_VToolBar->AddSeparator();
|
||||
|
||||
m_VToolBar->AddTool( ID_PCB_HIGHLIGHT_BUTT, wxEmptyString,
|
||||
wxBitmap( net_hightlight_xpm ), _( "Highlight net" ),
|
||||
wxBitmap( net_highlight_xpm ), _( "Highlight net" ),
|
||||
wxITEM_CHECK );
|
||||
|
||||
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 );
|
||||
}
|
||||
|
||||
/*
|
||||
int layer_mask = g_TabAllCopperLayerMask[g_DesignSettings.m_CopperLayerCount - 1];
|
||||
|
||||
layer_mask |= ALL_NO_CU_LAYERS;
|
||||
*/
|
||||
int layer_mask = g_DesignSettings.GetEnabledLayers();
|
||||
unsigned length = 0;
|
||||
|
||||
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
|
||||
static const int HK_SwitchLayer[EDGE_N + 1] = {
|
||||
HK_SWITCH_LAYER_TO_COPPER,
|
||||
|
|
|
@ -266,13 +266,6 @@ void WinEDA_PcbFrame::SetToolbars()
|
|||
_( "Normal 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)
|
||||
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR1,
|
||||
(m_AuxVToolBar && m_AuxVToolBar->IsShown()) ? true : false );
|
||||
|
|
|
@ -172,8 +172,8 @@ void BOARD::Draw( WinEDA_DrawPanel* aPanel, wxDC* DC,
|
|||
}
|
||||
|
||||
// @todo: this high-light functionality could be built into me.
|
||||
if( g_HightLigt_Status )
|
||||
DrawHighLight( aPanel, DC, g_HightLigth_NetCode );
|
||||
if( g_HighLight_Status )
|
||||
DrawHighLight( aPanel, DC, g_HighLight_NetCode );
|
||||
|
||||
// draw the BOARD's markers last, otherwise the high light will erase
|
||||
// any marker on a pad
|
||||
|
@ -188,7 +188,7 @@ void BOARD::DrawHighLight( WinEDA_DrawPanel* aDrawPanel, wxDC* DC, int aNetCode
|
|||
{
|
||||
int draw_mode;
|
||||
|
||||
if( g_HightLigt_Status )
|
||||
if( g_HighLight_Status )
|
||||
draw_mode = GR_SURBRILL | GR_OR;
|
||||
else
|
||||
draw_mode = GR_AND | GR_SURBRILL;
|
||||
|
|
|
@ -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( 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 )
|
||||
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 */
|
||||
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();
|
||||
Hight_Light( DC );
|
||||
g_HighLight_NetCode = g_Zone_Default_Setting.m_NetcodeSelection = zone_container->GetNet();
|
||||
High_Light( DC );
|
||||
}
|
||||
|
||||
s_PickedList.ClearListAndDeleteItems();
|
||||
|
@ -506,9 +506,9 @@ int WinEDA_PcbFrame::Begin_Zone( wxDC* DC )
|
|||
DrawPanel->m_IgnoreMouseEvents = TRUE;
|
||||
if( zone->IsOnCopperLayer() )
|
||||
{ // 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->SetNetNameFromNetCode( );
|
||||
}
|
||||
|
@ -549,13 +549,13 @@ int WinEDA_PcbFrame::Begin_Zone( wxDC* DC )
|
|||
{
|
||||
if( s_CurrentZone )
|
||||
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;
|
||||
Hight_Light( DC );
|
||||
g_HighLight_NetCode = g_Zone_Default_Setting.m_NetcodeSelection;
|
||||
High_Light( DC );
|
||||
}
|
||||
if( !s_AddCutoutToCurrentZone )
|
||||
s_CurrentZone = NULL; // the zone is used only once ("add similar zone" command)
|
||||
|
|
Loading…
Reference in New Issue