Commit 713d0175 authored by lifekidyeaa's avatar lifekidyeaa

added the following features (mostly hotkey type stuff):

* backspace key now deletes segments and vias both while editing a new track and while 
modifying old ones
* internal layers can be accessed via F5-F8
* when creating a new trace, switching between layers with the Pageup, PageDown, and 
F5-F8 hotkeys inserts a via. (warning: i did not test this with blind vias; however, it 
calls Other_Layer_Route, so should still work)
* spelling fix
parent 22599cf6
...@@ -32,7 +32,7 @@ enum Mod_Attribut /* Attributs d'un module */ ...@@ -32,7 +32,7 @@ enum Mod_Attribut /* Attributs d'un module */
/* flags for autoplace and autoroute (.m_ModuleStatus member) */ /* flags for autoplace and autoroute (.m_ModuleStatus member) */
#define MODULE_is_LOCKED 0x01 /* module LOCKED: no autoplace allowed */ #define MODULE_is_LOCKED 0x01 /* module LOCKED: no autoplace allowed */
#define MODULE_is_PLACED 0x02 /* In autoplace: module automatically placed */ #define MODULE_is_PLACED 0x02 /* In autoplace: module automatically placed */
#define MODULE_to_PLACE 0x04 /* In autoplace: module waiting fot autoplace */ #define MODULE_to_PLACE 0x04 /* In autoplace: module waiting for autoplace */
class MODULE: public EDA_BaseStruct class MODULE: public EDA_BaseStruct
{ {
......
...@@ -179,22 +179,12 @@ int CurrentTime = time(NULL); ...@@ -179,22 +179,12 @@ int CurrentTime = time(NULL);
break ; break ;
case WXK_NUMPAD0 : case WXK_NUMPAD0 :
case WXK_PAGEUP : case WXK_PAGEUP :
if ( GetScreen()->m_Active_Layer != CMP_N ) SwitchLayer(DC, CMP_N);
{
GetScreen()->m_Active_Layer = CMP_N;
if ( DisplayOpt.ContrastModeDisplay )
GetScreen()->SetRefreshReq();
}
break ; break ;
case WXK_NUMPAD9 : case WXK_NUMPAD9 :
case WXK_PAGEDOWN : case WXK_PAGEDOWN :
if ( GetScreen()->m_Active_Layer != CUIVRE_N ) SwitchLayer(DC, CUIVRE_N);
{
GetScreen()->m_Active_Layer = CUIVRE_N;
if ( DisplayOpt.ContrastModeDisplay )
GetScreen()->SetRefreshReq();
}
break ; break ;
case 'F' | GR_KB_CTRL : case 'F' | GR_KB_CTRL :
...@@ -252,7 +242,20 @@ int CurrentTime = time(NULL); ...@@ -252,7 +242,20 @@ int CurrentTime = time(NULL);
oldpos = curpos = GetScreen()->m_Curseur; oldpos = curpos = GetScreen()->m_Curseur;
break; break;
case WXK_F5 : /* unused */ case WXK_F5 :
SwitchLayer(DC, LAYER_N_2);
break;
case WXK_F6 :
SwitchLayer(DC, LAYER_N_3);
break;
case WXK_F7 :
SwitchLayer(DC, LAYER_N_4);
break;
case WXK_F8 :
SwitchLayer(DC, LAYER_N_5);
break; break;
case WXK_NUMPAD8 : /* Deplacement curseur vers le haut */ case WXK_NUMPAD8 : /* Deplacement curseur vers le haut */
...@@ -352,5 +355,25 @@ int CurrentTime = time(NULL); ...@@ -352,5 +355,25 @@ int CurrentTime = time(NULL);
OnHotKey(DC, hotkey, NULL); OnHotKey(DC, hotkey, NULL);
} }
} }
/****************************************************************/
void WinEDA_BasePcbFrame::SwitchLayer(wxDC *DC, int layer)
/*****************************************************************/
{
//overridden in WinEDA_PcbFrame;
int preslayer = GetScreen()->m_Active_Layer;
//if there is only one layer, don't switch.
if ( m_Pcb->m_BoardSettings->m_CopperLayerCount <= 1)
return;
//otherwise, must be at least 2 layers..see if it is possible.
if(layer != LAYER_CUIVRE_N || layer != LAYER_CMP_N ||
layer >= m_Pcb->m_BoardSettings->m_CopperLayerCount-1)
return;
if(preslayer == layer)
return;
GetScreen()->m_Active_Layer = layer;
if ( DisplayOpt.ContrastModeDisplay )
GetScreen()->SetRefreshReq();
}
...@@ -27,7 +27,6 @@ TRACK * WinEDA_PcbFrame::Delete_Segment(wxDC * DC, TRACK *Track) ...@@ -27,7 +27,6 @@ TRACK * WinEDA_PcbFrame::Delete_Segment(wxDC * DC, TRACK *Track)
*/ */
{ {
int current_net_code; int current_net_code;
if ( Track == NULL ) return NULL; if ( Track == NULL ) return NULL;
if(Track->m_Flags & IS_NEW) // Trace en cours, on peut effacer le dernier segment if(Track->m_Flags & IS_NEW) // Trace en cours, on peut effacer le dernier segment
......
...@@ -271,14 +271,16 @@ void WinEDA_PcbGeneralOptionsFrame::CreateControls() ...@@ -271,14 +271,16 @@ void WinEDA_PcbGeneralOptionsFrame::CreateControls()
_("Inches"), _("Inches"),
_("millimeters") _("millimeters")
}; };
m_BoxUnits = new wxRadioBox( itemDialog1, ID_RADIOBOX1, _("Units"), wxDefaultPosition, wxDefaultSize, 2, m_BoxUnitsStrings, 1, wxRA_SPECIFY_COLS ); m_BoxUnits = new wxRadioBox( itemDialog1, ID_RADIOBOX1, _("Units"), wxDefaultPosition,
wxDefaultSize, 2, m_BoxUnitsStrings, 1,wxRA_SPECIFY_COLS );
itemBoxSizer3->Add(m_BoxUnits, 0, wxALIGN_LEFT|wxALL, 5); itemBoxSizer3->Add(m_BoxUnits, 0, wxALIGN_LEFT|wxALL, 5);
wxString m_CursorShapeStrings[] = { wxString m_CursorShapeStrings[] = {
_("Small"), _("Small"),
_("Big") _("Big")
}; };
m_CursorShape = new wxRadioBox( itemDialog1, ID_RADIOBOX2, _("Cursor"), wxDefaultPosition, wxDefaultSize, 2, m_CursorShapeStrings, 1, wxRA_SPECIFY_COLS ); m_CursorShape = new wxRadioBox( itemDialog1, ID_RADIOBOX2, _("Cursor"), wxDefaultPosition, wxDefaultSize, 2,
m_CursorShapeStrings, 1, wxRA_SPECIFY_COLS );
itemBoxSizer3->Add(m_CursorShape, 0, wxALIGN_LEFT|wxALL, 5); itemBoxSizer3->Add(m_CursorShape, 0, wxALIGN_LEFT|wxALL, 5);
wxBoxSizer* itemBoxSizer7 = new wxBoxSizer(wxVERTICAL); wxBoxSizer* itemBoxSizer7 = new wxBoxSizer(wxVERTICAL);
......
...@@ -23,8 +23,8 @@ static void Process_Move_Item(WinEDA_PcbFrame * frame, ...@@ -23,8 +23,8 @@ static void Process_Move_Item(WinEDA_PcbFrame * frame,
/********************************************************************/ /********************************************************************/
void WinEDA_PcbFrame::OnLeftClick(wxDC * DC, const wxPoint& MousePos) void WinEDA_PcbFrame::OnLeftClick(wxDC * DC, const wxPoint& MousePos)
/********************************************************************/ /********************************************************************/
/* Traite les commandes declenche par le bouton gauche de la souris, /* Traite les commandes declenche par le bouton gauche de la souris,
quand un outil est deja selectionn quand un outil est deja selectionn
*/ */
{ {
EDA_BaseStruct * DrawStruct = CURRENT_ITEM; EDA_BaseStruct * DrawStruct = CURRENT_ITEM;
...@@ -316,7 +316,7 @@ int itmp; ...@@ -316,7 +316,7 @@ int itmp;
pos.y += 20; pos.y += 20;
switch ( id ) // Arret eventuel de la commande de dplacement en cours switch ( id ) // Arret eventuel de la commande de dplacement en cours
{ {
case wxID_CUT: case wxID_CUT:
case wxID_COPY: case wxID_COPY:
...@@ -421,7 +421,7 @@ int itmp; ...@@ -421,7 +421,7 @@ int itmp;
else SetCursor(DrawPanel->m_PanelCursor = DrawPanel->m_PanelDefaultCursor); else SetCursor(DrawPanel->m_PanelCursor = DrawPanel->m_PanelDefaultCursor);
break; break;
default: // Arret de la commande de dplacement en cours default: // Arret de la commande de dplacement en cours
if( DrawPanel->ManageCurseur && if( DrawPanel->ManageCurseur &&
DrawPanel->ForceCloseManageCurseur ) DrawPanel->ForceCloseManageCurseur )
{ {
...@@ -650,12 +650,14 @@ int itmp; ...@@ -650,12 +650,14 @@ int itmp;
case ID_POPUP_PCB_DELETE_TRACKSEG: case ID_POPUP_PCB_DELETE_TRACKSEG:
if ( CURRENT_ITEM == NULL) break;
DrawPanel->MouseToCursorSchema(); DrawPanel->MouseToCursorSchema();
GetScreen()->m_CurrentItem = Delete_Segment(&dc, (TRACK*)CURRENT_ITEM); GetScreen()->m_CurrentItem = Delete_Segment(&dc, (TRACK*)CURRENT_ITEM);
GetScreen()->SetModify(); GetScreen()->SetModify();
break; break;
case ID_POPUP_PCB_DELETE_TRACK: case ID_POPUP_PCB_DELETE_TRACK:
if ( CURRENT_ITEM == NULL) break;
DrawPanel->MouseToCursorSchema(); DrawPanel->MouseToCursorSchema();
Delete_Track(&dc, (TRACK*)CURRENT_ITEM); Delete_Track(&dc, (TRACK*)CURRENT_ITEM);
GetScreen()->m_CurrentItem = NULL; GetScreen()->m_CurrentItem = NULL;
...@@ -1159,8 +1161,8 @@ static void Process_Move_Item(WinEDA_PcbFrame * frame, ...@@ -1159,8 +1161,8 @@ static void Process_Move_Item(WinEDA_PcbFrame * frame,
/********************************************************************************/ /********************************************************************************/
void WinEDA_PcbFrame::OnLeftDClick(wxDC * DC, const wxPoint& MousePos) void WinEDA_PcbFrame::OnLeftDClick(wxDC * DC, const wxPoint& MousePos)
/********************************************************************************/ /********************************************************************************/
/* Appel sur un double click: /* Appel sur un double click:
pour un lment editable (textes, composant): pour un �l�ment editable (textes, composant):
appel de l'editeur correspondant. appel de l'editeur correspondant.
pour une connexion en cours: pour une connexion en cours:
termine la connexion termine la connexion
...@@ -1183,7 +1185,7 @@ wxClientDC dc(DrawPanel); ...@@ -1183,7 +1185,7 @@ wxClientDC dc(DrawPanel);
if ( (DrawStruct == NULL) || (DrawStruct->m_Flags != 0) ) if ( (DrawStruct == NULL) || (DrawStruct->m_Flags != 0) )
break; break;
// Element localis // Element localis
GetScreen()->m_CurrentItem = DrawStruct; GetScreen()->m_CurrentItem = DrawStruct;
switch ( DrawStruct->m_StructType ) switch ( DrawStruct->m_StructType )
{ {
...@@ -1334,3 +1336,38 @@ void WinEDA_PcbFrame::RemoveStruct(EDA_BaseStruct * Item, wxDC * DC) ...@@ -1334,3 +1336,38 @@ void WinEDA_PcbFrame::RemoveStruct(EDA_BaseStruct * Item, wxDC * DC)
break; break;
} }
} }
/****************************************************************/
void WinEDA_PcbFrame::SwitchLayer(wxDC *DC, int layer)
/*****************************************************************/
{
int preslayer = GetScreen()->m_Active_Layer;
//if there is only one layer, don't switch.
if ( m_Pcb->m_BoardSettings->m_CopperLayerCount <= 1)
return;
//otherwise, must be at least 2 layers..see if it is possible.
if(layer == LAYER_CUIVRE_N || layer == LAYER_CMP_N ||
layer < m_Pcb->m_BoardSettings->m_CopperLayerCount-1){
if(preslayer == layer)
return;
EDA_BaseStruct* current = GetScreen()->m_CurrentItem;
//see if we are drawing a segment; if so, add a via?
if ( m_ID_current_state == ID_TRACK_BUTT && current != NULL)
{
if(current->m_StructType == TYPETRACK && (current->m_Flags & IS_NEW)){
//want to set the routing layers so that it switches properly -
//see the implementation of Other_Layer_Route - the working
//layer is used to 'start' the via and set the layer masks appropriately.
GetScreen()->m_Route_Layer_TOP = preslayer;
GetScreen()->m_Route_Layer_BOTTOM = layer;
GetScreen()->m_Active_Layer = preslayer;
Other_Layer_Route( (TRACK *) GetScreen()->m_CurrentItem, DC);
}
}else{
GetScreen()->m_Active_Layer = layer;
}
if ( DisplayOpt.ContrastModeDisplay )
GetScreen()->SetRefreshReq();
}
}
...@@ -192,8 +192,10 @@ int itmp; ...@@ -192,8 +192,10 @@ int itmp;
Via->m_NetCode = g_HightLigth_NetCode ; Via->m_NetCode = g_HightLigth_NetCode ;
Via->m_Start = Via->m_End = g_CurrentTrackSegment->m_End; Via->m_Start = Via->m_End = g_CurrentTrackSegment->m_End;
Via->m_Layer = GetScreen()->m_Active_Layer; // Provisoirement Via->m_Layer = GetScreen()->m_Active_Layer;
// Provisoirement. indicate the first layer (?)
//swap the layers.
if( GetScreen()->m_Active_Layer != GetScreen()->m_Route_Layer_TOP) if( GetScreen()->m_Active_Layer != GetScreen()->m_Route_Layer_TOP)
GetScreen()->m_Active_Layer = GetScreen()->m_Route_Layer_TOP ; GetScreen()->m_Active_Layer = GetScreen()->m_Route_Layer_TOP ;
else GetScreen()->m_Active_Layer = GetScreen()->m_Route_Layer_BOTTOM ; else GetScreen()->m_Active_Layer = GetScreen()->m_Route_Layer_BOTTOM ;
...@@ -202,7 +204,7 @@ int itmp; ...@@ -202,7 +204,7 @@ int itmp;
{ {
Via->m_Layer |= GetScreen()->m_Active_Layer << 4; Via->m_Layer |= GetScreen()->m_Active_Layer << 4;
} }
else if ( (Via->m_Shape & 15) == VIA_BORGNE ) else if ( (Via->m_Shape & 15) == VIA_BORGNE ) //blind via
{ // A revoir! ( la via devrait deboucher sur 1 cote ) { // A revoir! ( la via devrait deboucher sur 1 cote )
Via->m_Layer |= GetScreen()->m_Active_Layer << 4; Via->m_Layer |= GetScreen()->m_Active_Layer << 4;
} }
......
...@@ -46,7 +46,32 @@ MODULE* module = NULL; ...@@ -46,7 +46,32 @@ MODULE* module = NULL;
case WXK_NUMPAD_DELETE: case WXK_NUMPAD_DELETE:
OnHotkeyDeleteItem(DC, DrawStruct); OnHotkeyDeleteItem(DC, DrawStruct);
break; break;
case WXK_BACK:{
if( m_ID_current_state == ID_TRACK_BUTT &&
GetScreen()->m_Active_Layer <= CMP_N ){
bool ItemFree = (GetScreen()->m_CurrentItem == NULL ) ||
(GetScreen()->m_CurrentItem->m_Flags == 0);
if ( ItemFree ){
//no track is currently being edited - select a segment and remove it.
DrawStruct = PcbGeneralLocateAndDisplay();
if ( DrawStruct )
Delete_Segment(DC, (TRACK*)DrawStruct);
GetScreen()->SetModify();
}
else if ( GetScreen()->m_CurrentItem->m_StructType == TYPETRACK )
{
//then an element is being edited - remove the last segment.
GetScreen()->m_CurrentItem =
Delete_Segment(DC, (TRACK*)GetScreen()->m_CurrentItem);
GetScreen()->SetModify();
}
}
break;
}
case WXK_END:
DrawPanel->MouseToCursorSchema();
End_Route( (TRACK *) (GetScreen()->m_CurrentItem), DC);
break;
case 'v': // Rotation case 'v': // Rotation
case 'V': case 'V':
if ( m_ID_current_state != ID_TRACK_BUTT ) return; if ( m_ID_current_state != ID_TRACK_BUTT ) return;
......
## Makefile for PCBNEW et wxGTK ## Makefile for PCBNEW et wxGTK
CC = gcc CC = gcc
LD = gcc LD = gcc
# DEBUG = 1
# Compiler flags. # Compiler flags.
ifdef DEBUG
CPPFLAGS = -Wall -g `wx-config --cxxflags`
LDFLAGS = -g
else
CPPFLAGS = -Wall -O2 `wx-config --cxxflags` CPPFLAGS = -Wall -O2 `wx-config --cxxflags`
LDFLAGS = -s -v
LDFLAGS = -s endif
include ../libs.linux include ../libs.linux
......
...@@ -168,7 +168,9 @@ wxClientDC dc(DrawPanel); ...@@ -168,7 +168,9 @@ wxClientDC dc(DrawPanel);
MODULE* newmod = new MODULE(mainpcb); MODULE* newmod = new MODULE(mainpcb);
newmod->Copy(presmod); //this will copy the padstack layers etc newmod->Copy(presmod); //this will copy the padstack layers etc
newmod->m_Parent = mainpcb; //modify after the copy above newmod->m_Parent = mainpcb; //modify after the copy above
newmod->m_Layer = mod->m_Layer; if(mod->m_Layer != CMP_N){//just changing m_Layer is insufficient.
Change_Side_Module(newmod, &dc);
}
newmod->m_Pos = mod->m_Pos; newmod->m_Pos = mod->m_Pos;
newmod->m_Orient =0; //otherwise the pads will be rotated with respect to the module. newmod->m_Orient =0; //otherwise the pads will be rotated with respect to the module.
//copy data into the pads... //copy data into the pads...
......
/********************************************************************************/ /********************************************************************************/
/* onrightclick.cpp: fonctions de l'edition du PCB appeles par le bouton droit */ /* onrightclick.cpp: fonctions de l'edition du PCB appel�es par le bouton droit */
/********************************************************************************/ /********************************************************************************/
#include "fctsys.h" #include "fctsys.h"
...@@ -117,9 +117,9 @@ double value; ...@@ -117,9 +117,9 @@ double value;
/****************************************************************************/ /****************************************************************************/
void WinEDA_PcbFrame::OnRightClick(const wxPoint& MousePos, wxMenu * PopMenu) void WinEDA_PcbFrame::OnRightClick(const wxPoint& MousePos, wxMenu * PopMenu)
/****************************************************************************/ /****************************************************************************/
/* Prepare le menu PopUp affich par un click sur le bouton droit /* Prepare le menu PopUp affich� par un click sur le bouton droit
de la souris. de la souris.
Ce menu est ensuite complt par la liste des commandes de ZOOM Ce menu est ensuite compl�t� par la liste des commandes de ZOOM
*/ */
{ {
EDA_BaseStruct *DrawStruct = m_CurrentScreen->m_CurrentItem; EDA_BaseStruct *DrawStruct = m_CurrentScreen->m_CurrentItem;
...@@ -545,7 +545,7 @@ int flags = Track->m_Flags; ...@@ -545,7 +545,7 @@ int flags = Track->m_Flags;
else // Edition in progress else // Edition in progress
{ {
if( flags & IS_NEW ) if( flags & IS_NEW )
ADD_MENUITEM(PopMenu, ID_POPUP_PCB_END_TRACK, _("End Track"), apply_xpm); ADD_MENUITEM(PopMenu, ID_POPUP_PCB_END_TRACK, _("End Track (end)"), apply_xpm);
PopMenu->Append(ID_POPUP_PCB_PLACE_VIA, _("Place Via (V)")); PopMenu->Append(ID_POPUP_PCB_PLACE_VIA, _("Place Via (V)"));
} }
...@@ -574,11 +574,11 @@ int flags = Track->m_Flags; ...@@ -574,11 +574,11 @@ int flags = Track->m_Flags;
ADD_MENUITEM_WITH_SUBMENU( PopMenu, track_mnu, ADD_MENUITEM_WITH_SUBMENU( PopMenu, track_mnu,
ID_POPUP_PCB_DELETE_TRACK_MNU, _("Delete"), delete_xpm); ID_POPUP_PCB_DELETE_TRACK_MNU, _("Delete"), delete_xpm);
ADD_MENUITEM(track_mnu, ID_POPUP_PCB_DELETE_TRACKSEG, ADD_MENUITEM(track_mnu, ID_POPUP_PCB_DELETE_TRACKSEG,
_("Delete Segment"), Delete_Line_xpm); _("Delete Segment (backspace)"), Delete_Line_xpm);
if( !flags ) if( !flags )
{ {
ADD_MENUITEM(track_mnu, ID_POPUP_PCB_DELETE_TRACK, ADD_MENUITEM(track_mnu, ID_POPUP_PCB_DELETE_TRACK,
_("Delete Track"), Delete_Track_xpm); _("Delete Track (delete)"), Delete_Track_xpm);
ADD_MENUITEM(track_mnu, ID_POPUP_PCB_DELETE_TRACKNET, ADD_MENUITEM(track_mnu, ID_POPUP_PCB_DELETE_TRACKNET,
_("Delete Net"), Delete_Net_xpm); _("Delete Net"), Delete_Net_xpm);
} }
......
...@@ -159,7 +159,7 @@ BEGIN_EVENT_TABLE(WinEDA_PcbFrame, wxFrame) ...@@ -159,7 +159,7 @@ BEGIN_EVENT_TABLE(WinEDA_PcbFrame, wxFrame)
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,
WinEDA_PcbFrame::Process_Special_Functions ) WinEDA_PcbFrame::Process_Special_Functions )
// PopUp Menus pour Zooms traits dans drawpanel.cpp // PopUp Menus pour Zooms traits dans drawpanel.cpp
END_EVENT_TABLE() END_EVENT_TABLE()
...@@ -178,7 +178,7 @@ WinEDA_PcbFrame::WinEDA_PcbFrame(wxWindow * father, WinEDA_App *parent, ...@@ -178,7 +178,7 @@ WinEDA_PcbFrame::WinEDA_PcbFrame(wxWindow * father, WinEDA_App *parent,
m_FrameName = wxT("PcbFrame"); m_FrameName = wxT("PcbFrame");
m_Draw_Axis = TRUE; // TRUE pour avoir les axes dessines m_Draw_Axis = TRUE; // TRUE pour avoir les axes dessines
m_Draw_Grid = g_ShowGrid; // TRUE pour avoir la grille dessinee m_Draw_Grid = g_ShowGrid; // TRUE pour avoir la grille dessinee
m_Draw_Sheet_Ref = TRUE; // TRUE pour avoir le cartouche dessin m_Draw_Sheet_Ref = TRUE; // TRUE pour avoir le cartouche dessin
m_Draw_Auxiliary_Axis = TRUE; m_Draw_Auxiliary_Axis = TRUE;
m_SelTrackWidthBox = NULL; m_SelTrackWidthBox = NULL;
m_SelViaSizeBox = NULL; m_SelViaSizeBox = NULL;
...@@ -275,7 +275,7 @@ PCB_SCREEN * screen; ...@@ -275,7 +275,7 @@ PCB_SCREEN * screen;
} }
/* Reselection de l'ecran de base, /* Reselection de l'ecran de base,
pour les evenements de refresh gnrs par wxWindows */ pour les evenements de refresh g�n�r�s par wxWindows */
m_CurrentScreen = ActiveScreen = ScreenPcb; m_CurrentScreen = ActiveScreen = ScreenPcb;
SaveSettings(); SaveSettings();
...@@ -342,7 +342,7 @@ int ii, jj; ...@@ -342,7 +342,7 @@ int ii, jj;
m_OptionsToolBar->ToggleTool(ID_TB_OPTIONS_DRC_OFF, m_OptionsToolBar->ToggleTool(ID_TB_OPTIONS_DRC_OFF,
! Drc_On); ! Drc_On);
m_OptionsToolBar->SetToolShortHelp(ID_TB_OPTIONS_DRC_OFF, m_OptionsToolBar->SetToolShortHelp(ID_TB_OPTIONS_DRC_OFF,
Drc_On ? _("DCR Off (Disable !!!), Currently: DRC is active") : _("DRC On (Currently: DRC is DISABLE !!!)")); Drc_On ? _("DRC Off (Disable !!!), Currently: DRC is active") : _("DRC On (Currently: DRC is inactive !!!)"));
m_OptionsToolBar->ToggleTool(ID_TB_OPTIONS_SELECT_UNIT_MM, m_OptionsToolBar->ToggleTool(ID_TB_OPTIONS_SELECT_UNIT_MM,
g_UnitMetric == MILLIMETRE ? TRUE : FALSE); g_UnitMetric == MILLIMETRE ? TRUE : FALSE);
......
...@@ -148,6 +148,7 @@ wxButton * Button; ...@@ -148,6 +148,7 @@ wxButton * Button;
} }
m_SelLayerBox->SetSelection( TextPCB->m_Layer ); m_SelLayerBox->SetSelection( TextPCB->m_Layer );
wxString orient_msg[4] = { wxT("0"), wxT("90"), wxT("180"), wxT("-90") }; wxString orient_msg[4] = { wxT("0"), wxT("90"), wxT("180"), wxT("-90") };
m_Orient = new wxRadioBox(this, -1, _("Orientation"), m_Orient = new wxRadioBox(this, -1, _("Orientation"),
wxDefaultPosition, wxSize(-1,-1), 4, orient_msg, wxDefaultPosition, wxSize(-1,-1), 4, orient_msg,
......
...@@ -425,7 +425,7 @@ long current_mask_layer; ...@@ -425,7 +425,7 @@ long current_mask_layer;
parent->AddControl(m_SelLayerBox); parent->AddControl(m_SelLayerBox);
} }
// Test si reconstruction de la liste ncessaire // Test si reconstruction de la liste ncessaire
current_mask_layer = 0; current_mask_layer = 0;
int Masque_Layer = g_TabAllCopperLayerMask[g_DesignSettings.m_CopperLayerCount-1]; int Masque_Layer = g_TabAllCopperLayerMask[g_DesignSettings.m_CopperLayerCount-1];
Masque_Layer |= ALL_NO_CU_LAYERS; Masque_Layer |= ALL_NO_CU_LAYERS;
...@@ -444,11 +444,12 @@ long current_mask_layer; ...@@ -444,11 +444,12 @@ long current_mask_layer;
{ {
if ( (g_TabOneLayerMask[ii] & Masque_Layer) ) if ( (g_TabOneLayerMask[ii] & Masque_Layer) )
{ {
m_SelLayerBox->Append(ReturnPcbLayerName(ii)); m_SelLayerBox->Append(ReturnPcbLayerName(ii,false,true));
m_SelLayerBox->SetClientData(jj, (void*)ii); m_SelLayerBox->SetClientData(jj, (void*)ii);
jj++; jj++;
} }
} }
m_SelLayerBox->SetToolTip(_("+/- to switch"));
} }
// Activation de l'affichage sur la bonne couche // Activation de l'affichage sur la bonne couche
......
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