Commit 3104b5d8 authored by CHARRAS's avatar CHARRAS

bug in cvpcb

parent 15b5df83
...@@ -116,6 +116,7 @@ int WinEDA_CvpcbFrame::ReadSchematicNetlist() ...@@ -116,6 +116,7 @@ int WinEDA_CvpcbFrame::ReadSchematicNetlist()
/* i points the beginning of the schematic time stamp */ /* i points the beginning of the schematic time stamp */
memset( schematic_timestamp, 0, sizeof(schematic_timestamp) );
j = 0; while( Line[i] != ' ' ) j = 0; while( Line[i] != ' ' )
schematic_timestamp[j++] = Line[i++]; schematic_timestamp[j++] = Line[i++];
...@@ -128,7 +129,6 @@ int WinEDA_CvpcbFrame::ReadSchematicNetlist() ...@@ -128,7 +129,6 @@ int WinEDA_CvpcbFrame::ReadSchematicNetlist()
/* i points the component value */ /* i points the component value */
LibName = Line + i; LibName = Line + i;
memset( schematic_timestamp, 0, sizeof(schematic_timestamp) );
memset( component_reference, 0, sizeof(component_reference) ); memset( component_reference, 0, sizeof(component_reference) );
memset( footprint_name, 0, sizeof(footprint_name) ); memset( footprint_name, 0, sizeof(footprint_name) );
memset( component_value, 0, sizeof(component_value) ); memset( component_value, 0, sizeof(component_value) );
......
...@@ -751,7 +751,7 @@ public: ...@@ -751,7 +751,7 @@ public:
// zone handling // zone handling
EDGE_ZONE* Del_SegmEdgeZone( wxDC* DC, EDGE_ZONE* edge_zone ); EDGE_ZONE* Del_SegmEdgeZone( wxDC* DC, EDGE_ZONE* edge_zone );
void CaptureNetName( wxDC* DC ); void CaptureNetName( wxDC* DC );
EDGE_ZONE* Begin_Zone(); EDGE_ZONE* Begin_Zone( wxDC* DC );
/** /**
* Function End_Zone * Function End_Zone
......
No preview for this file type
...@@ -2,8 +2,8 @@ msgid "" ...@@ -2,8 +2,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: kicad\n" "Project-Id-Version: kicad\n"
"POT-Creation-Date: \n" "POT-Creation-Date: \n"
"PO-Revision-Date: 2007-12-06 08:31+0100\n" "PO-Revision-Date: 2007-12-20 23:05+0100\n"
"Last-Translator: jp charras <jean-pierre.charras@inpg.fr>\n" "Last-Translator: \n"
"Language-Team: kicad team <jean-pierre.charras@ujf-grenoble.fr>\n" "Language-Team: kicad team <jean-pierre.charras@ujf-grenoble.fr>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-1\n" "Content-Type: text/plain; charset=iso-8859-1\n"
...@@ -3606,7 +3606,7 @@ msgstr "S ...@@ -3606,7 +3606,7 @@ msgstr "S
#: pcbnew/netlist.cpp:945 #: pcbnew/netlist.cpp:945
#, c-format #, c-format
msgid "Component [%s]: footprint <%s> not found" msgid "Component [%s]: footprint <%s> not found"
msgstr "Composant [%s]: Module <%sw non trouv en librairies" msgstr "Composant [%s]: Module <%s> non trouv en librairie"
#: pcbnew/editmod.cpp:144 #: pcbnew/editmod.cpp:144
msgid "Text is REFERENCE!" msgid "Text is REFERENCE!"
......
This diff is collapsed.
...@@ -39,11 +39,11 @@ ...@@ -39,11 +39,11 @@
////@begin control identifiers ////@begin control identifiers
#define ID_DIALOG 10000 #define ID_DIALOG 10000
#define ID_RADIOBOX3 10003 #define ID_RADIOBOX_GRID_SELECTION 10003
#define ID_TEXTCTRL1 10007 #define ID_TEXTCTRL1 10007
#define ID_RADIOBOX_OUTLINES_OPTION 10006
#define ID_RADIOBOX4 10008 #define ID_RADIOBOX4 10008
#define ID_RADIOBOX5 10009 #define ID_RADIOBOX5 10009
#define ID_BUTTON 10010
#define ID_NET_SORTING_OPTION 10005 #define ID_NET_SORTING_OPTION 10005
#define ID_NETNAME_SELECTION 10001 #define ID_NETNAME_SELECTION 10001
#define wxID_LAYER_SELECTION 10004 #define wxID_LAYER_SELECTION 10004
...@@ -85,8 +85,8 @@ public: ...@@ -85,8 +85,8 @@ public:
////@begin WinEDA_ZoneFrame event handler declarations ////@begin WinEDA_ZoneFrame event handler declarations
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON /// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK
void ExecFillZone( wxCommandEvent& event ); void OnOkClick( wxCommandEvent& event );
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL /// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL
void OnCancelClick( wxCommandEvent& event ); void OnCancelClick( wxCommandEvent& event );
...@@ -98,6 +98,9 @@ public: ...@@ -98,6 +98,9 @@ public:
////@begin WinEDA_ZoneFrame member function declarations ////@begin WinEDA_ZoneFrame member function declarations
int GetOutlinesOpt() const { return m_OutlinesOpt ; }
void SetOutlinesOpt(int value) { m_OutlinesOpt = value ; }
/// Retrieves bitmap resources /// Retrieves bitmap resources
wxBitmap GetBitmapResource( const wxString& name ); wxBitmap GetBitmapResource( const wxString& name );
...@@ -108,20 +111,25 @@ public: ...@@ -108,20 +111,25 @@ public:
/// Should we show tooltips? /// Should we show tooltips?
static bool ShowToolTips(); static bool ShowToolTips();
bool AcceptOptions(bool aPromptForErrors);
////@begin WinEDA_ZoneFrame member variables ////@begin WinEDA_ZoneFrame member variables
wxRadioBox* m_GridCtrl; wxRadioBox* m_GridCtrl;
wxStaticText* m_ClearanceValueTitle; wxStaticText* m_ClearanceValueTitle;
wxTextCtrl* m_ZoneClearanceCtrl; wxTextCtrl* m_ZoneClearanceCtrl;
wxRadioBox* m_OutlineAppearanceCtrl;
wxRadioBox* m_FillOpt; wxRadioBox* m_FillOpt;
wxRadioBox* m_OrientEdgesOpt; wxRadioBox* m_OrientEdgesOpt;
wxRadioBox* m_NetSortingOption; wxRadioBox* m_NetSortingOption;
wxListBox* m_ListNetNameSelection; wxListBox* m_ListNetNameSelection;
wxListBox* m_LayerSelectionCtrl; wxListBox* m_LayerSelectionCtrl;
int m_OutlinesOpt;
////@end WinEDA_ZoneFrame member variables ////@end WinEDA_ZoneFrame member variables
WinEDA_PcbFrame * m_Parent; WinEDA_PcbFrame * m_Parent;
int m_NetSorting;
int m_LayerId[LAYER_COUNT]; // Handle the real layer number from layer name position in m_LayerSelectionCtrl int m_LayerId[LAYER_COUNT]; // Handle the real layer number from layer name position in m_LayerSelectionCtrl
}; };
......
This diff is collapsed.
...@@ -215,13 +215,13 @@ void WinEDA_PcbFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos ) ...@@ -215,13 +215,13 @@ void WinEDA_PcbFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
case ID_PCB_ZONES_BUTT: case ID_PCB_ZONES_BUTT:
if( (DrawStruct == NULL) || (DrawStruct->m_Flags == 0) ) if( (DrawStruct == NULL) || (DrawStruct->m_Flags == 0) )
{ {
SetCurItem( DrawStruct = Begin_Zone() ); SetCurItem( DrawStruct = Begin_Zone( DC ) );
} }
else if( DrawStruct else if( DrawStruct
&& (DrawStruct->Type() == TYPEEDGEZONE) && (DrawStruct->Type() == TYPEEDGEZONE)
&& (DrawStruct->m_Flags & IS_NEW) ) && (DrawStruct->m_Flags & IS_NEW) )
{ {
SetCurItem( DrawStruct = Begin_Zone() ); SetCurItem( DrawStruct = Begin_Zone( DC ) );
} }
else else
DisplayError( this, wxT( "Edit: zone internal error" ) ); DisplayError( this, wxT( "Edit: zone internal error" ) );
......
...@@ -61,10 +61,13 @@ static bool Zone_Exclude_Pads = TRUE; ...@@ -61,10 +61,13 @@ static bool Zone_Exclude_Pads = TRUE;
static bool s_Zone_Create_Thermal_Relief = TRUE; static bool s_Zone_Create_Thermal_Relief = TRUE;
static int s_Zone_Layer; // Layer used to put the current zone static int s_Zone_Layer; // Layer used to put the current zone
static int s_NetcodeSelection; // Net code selection for the current zone static int s_NetcodeSelection; // Net code selection for the current zone
static int s_NetSortingOpt; // For the net list: sort option (by alphabetic order or bay pad count order
#define ZONE_NET_SORT_OPTION_KEY wxT("Zone_NetSort_Opt") #define ZONE_NET_SORT_OPTION_KEY wxT("Zone_NetSort_Opt")
enum zone_cmd {
ZONE_ABORT,
ZONE_OK
};
#include "dialog_zones_by_polygon.cpp" #include "dialog_zones_by_polygon.cpp"
...@@ -348,12 +351,38 @@ void WinEDA_BasePcbFrame::DelLimitesZone( wxDC* DC, bool Redraw ) ...@@ -348,12 +351,38 @@ void WinEDA_BasePcbFrame::DelLimitesZone( wxDC* DC, bool Redraw )
* either initializes the first segment of a new zone, or adds an * either initializes the first segment of a new zone, or adds an
* intermediate segment. * intermediate segment.
*/ */
EDGE_ZONE* WinEDA_PcbFrame::Begin_Zone() EDGE_ZONE* WinEDA_PcbFrame::Begin_Zone( wxDC* DC )
{ {
EDGE_ZONE* oldedge; EDGE_ZONE* oldedge;
EDGE_ZONE* newedge = NULL; EDGE_ZONE* newedge = NULL;
oldedge = m_Pcb->m_CurrentLimitZone; oldedge = m_Pcb->m_CurrentLimitZone;
if( m_Pcb->m_CurrentLimitZone == NULL ) /* Start a new contour: init zone params (net and layer) */
{
DrawPanel->m_IgnoreMouseEvents = TRUE;
WinEDA_ZoneFrame* frame = new WinEDA_ZoneFrame( this );
int diag = frame->ShowModal();
frame->Destroy();
DrawPanel->MouseToCursorSchema();
DrawPanel->m_IgnoreMouseEvents = FALSE;
if( diag == ZONE_ABORT )
return NULL;
GetScreen()->m_Active_Layer = s_Zone_Layer;
/* Show the Net */
if( (g_HightLigth_NetCode > 0) && (g_HightLigth_NetCode != s_NetcodeSelection) )
{
Hight_Light( DC ); // Remove old hightlight selection
}
g_HightLigth_NetCode = s_NetcodeSelection;
if ( ! g_HightLigt_Status )
Hight_Light( DC );
}
// if first segment // if first segment
if( (m_Pcb->m_CurrentLimitZone == NULL ) /* debut reel du trace */ if( (m_Pcb->m_CurrentLimitZone == NULL ) /* debut reel du trace */
...@@ -411,7 +440,7 @@ void WinEDA_PcbFrame::End_Zone( wxDC* DC ) ...@@ -411,7 +440,7 @@ void WinEDA_PcbFrame::End_Zone( wxDC* DC )
if( m_Pcb->m_CurrentLimitZone ) if( m_Pcb->m_CurrentLimitZone )
{ {
Begin_Zone(); Begin_Zone( DC );
/* le dernier point genere est de longueur tj nulle donc inutile. */ /* le dernier point genere est de longueur tj nulle donc inutile. */
/* il sera raccorde au point de depart */ /* il sera raccorde au point de depart */
...@@ -519,25 +548,15 @@ void WinEDA_PcbFrame::Fill_Zone( wxDC* DC ) ...@@ -519,25 +548,15 @@ void WinEDA_PcbFrame::Fill_Zone( wxDC* DC )
return; return;
} }
if( m_Parent && m_Parent->m_EDA_Config )
{
s_NetSortingOpt = m_Parent->m_EDA_Config->Read( ZONE_NET_SORT_OPTION_KEY, (long) BOARD::PAD_CNT_SORT );
}
int NetSortingOptImg = s_NetSortingOpt;
DrawPanel->m_IgnoreMouseEvents = TRUE; DrawPanel->m_IgnoreMouseEvents = TRUE;
WinEDA_ZoneFrame* frame = new WinEDA_ZoneFrame( this ); WinEDA_ZoneFrame* frame = new WinEDA_ZoneFrame( this );
int abrd = frame->ShowModal(); int diag = frame->ShowModal();
frame->Destroy(); frame->Destroy();
DrawPanel->MouseToCursorSchema(); DrawPanel->MouseToCursorSchema();
DrawPanel->m_IgnoreMouseEvents = FALSE; DrawPanel->m_IgnoreMouseEvents = FALSE;
if( (NetSortingOptImg != s_NetSortingOpt ) && m_Parent && m_Parent->m_EDA_Config ) if( diag == ZONE_ABORT )
{
m_Parent->m_EDA_Config->Write( ZONE_NET_SORT_OPTION_KEY, (long) s_NetSortingOpt );
}
if( abrd )
return; return;
// set all the EDGE_ZONEs to the currently active layer and redraw them // set all the EDGE_ZONEs to the currently active layer and redraw them
...@@ -551,14 +570,15 @@ void WinEDA_PcbFrame::Fill_Zone( wxDC* DC ) ...@@ -551,14 +570,15 @@ void WinEDA_PcbFrame::Fill_Zone( wxDC* DC )
Trace_DrawSegmentPcb( DrawPanel, DC, PtLim, GR_XOR ); Trace_DrawSegmentPcb( DrawPanel, DC, PtLim, GR_XOR );
} }
/* Show the NetName */ /* Show the Net */
if( (g_HightLigth_NetCode > 0) && (g_HightLigth_NetCode != s_NetcodeSelection) ) if( (g_HightLigth_NetCode > 0) && (g_HightLigth_NetCode != s_NetcodeSelection) )
{ {
Hight_Light( DC ); Hight_Light( DC ); // Remoive old hightlight selection
g_HightLigth_NetCode = s_NetcodeSelection; }
Hight_Light( DC );
}
g_HightLigth_NetCode = s_NetcodeSelection; g_HightLigth_NetCode = s_NetcodeSelection;
if ( ! g_HightLigt_Status )
Hight_Light( DC );
if( g_HightLigth_NetCode > 0 ) if( g_HightLigth_NetCode > 0 )
{ {
...@@ -576,7 +596,6 @@ void WinEDA_PcbFrame::Fill_Zone( wxDC* DC ) ...@@ -576,7 +596,6 @@ void WinEDA_PcbFrame::Fill_Zone( wxDC* DC )
Affiche_1_Parametre( this, 22, _( "NetName" ), msg, RED ); Affiche_1_Parametre( this, 22, _( "NetName" ), msg, RED );
Build_Zone( this, DC, g_HightLigth_NetCode, Zone_Exclude_Pads, s_Zone_Create_Thermal_Relief ); Build_Zone( this, DC, g_HightLigth_NetCode, Zone_Exclude_Pads, s_Zone_Create_Thermal_Relief );
GetScreen()->SetModify();
GetScreen()->SetModify();
} }
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