diff --git a/common/build_version.cpp b/common/build_version.cpp index c8b669d80b..58dc3f4a8a 100644 --- a/common/build_version.cpp +++ b/common/build_version.cpp @@ -6,7 +6,7 @@ #endif #ifndef KICAD_BUILD_VERSION -#define KICAD_BUILD_VERSION "(2011-05-12)" +#define KICAD_BUILD_VERSION "(2011-05-25)" #endif diff --git a/eeschema/dialogs/dialog_eeschema_options_base.cpp b/eeschema/dialogs/dialog_eeschema_options_base.cpp index 70b52e0f68..c1590e9197 100644 --- a/eeschema/dialogs/dialog_eeschema_options_base.cpp +++ b/eeschema/dialogs/dialog_eeschema_options_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Sep 8 2010) +// C++ code generated with wxFormBuilder (version Nov 17 2010) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -151,7 +151,7 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx m_panel1->SetSizer( p1mainSizer ); m_panel1->Layout(); p1mainSizer->Fit( m_panel1 ); - m_notebook1->AddPage( m_panel1, _("General Options"), false ); + m_notebook1->AddPage( m_panel1, _("General Options"), true ); m_panel2 = new wxPanel( m_notebook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); m_panel2->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); m_panel2->SetToolTip( _("User defined field names for schematic components. ") ); @@ -240,7 +240,7 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx m_panel2->SetSizer( bSizer6 ); m_panel2->Layout(); bSizer6->Fit( m_panel2 ); - m_notebook1->AddPage( m_panel2, _("Template Field Names"), true ); + m_notebook1->AddPage( m_panel2, _("Template Field Names"), false ); bOptionsSizer->Add( m_notebook1, 1, wxEXPAND, 0 ); diff --git a/eeschema/dialogs/dialog_eeschema_options_base.fbp b/eeschema/dialogs/dialog_eeschema_options_base.fbp index b2e18f1c77..ff063218f4 100644 --- a/eeschema/dialogs/dialog_eeschema_options_base.fbp +++ b/eeschema/dialogs/dialog_eeschema_options_base.fbp @@ -22,25 +22,54 @@ 1 0 + 1 + 1 + 1 + 1 + 0 + wxSYS_COLOUR_BTNFACE + + 1 wxBOTH + 0 + 1 1 + 0 + Dock + 0 + Left 1 impl_virtual + 1 + 0 0 wxID_ANY + + 0 + 0 + 1 DIALOG_EESCHEMA_OPTIONS_BASE + 1 + + + 1 + + Resizable + + 1 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER Schematic Editor Options + 0 wxFILTER_NONE @@ -98,23 +127,51 @@ wxEXPAND 1 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY + + 0 + 0 + 1 m_notebook1 + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -151,23 +208,51 @@ General Options - 0 + 1 + 1 + 1 + 1 + 1 + wxSYS_COLOUR_BTNFACE + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY + + 0 + 0 + 1 m_panel1 + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -234,23 +319,51 @@ wxALIGN_CENTER_VERTICAL|wxALL 1 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Measurement &units: + + 0 + 0 + 1 m_staticText2 + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -290,23 +403,51 @@ wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND 1 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY + + 0 + 0 + 1 m_choiceUnits + 1 + + protected + 1 + + Resizable + 0 + 1 + 0 wxFILTER_NONE @@ -356,23 +497,51 @@ wxALIGN_CENTER_VERTICAL|wxALL 1 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY &Grid size: + + 0 + 0 + 1 m_staticText3 + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -412,23 +581,51 @@ wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND 0 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY + + 0 + 0 + 1 m_choiceGridSize + 1 + + protected + 1 + + Resizable + 0 + 1 + 0 wxFILTER_NONE @@ -468,23 +665,51 @@ wxALIGN_CENTER_VERTICAL|wxALL 0 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY mils + + 0 + 0 + 1 m_staticGridUnits + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -524,23 +749,51 @@ wxALIGN_CENTER_VERTICAL|wxALL 1 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Default &line width: + + 0 + 0 + 1 m_staticText5 + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -580,25 +833,53 @@ wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND 0 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY 0 + 100 + 0 0 + 0 + 1 m_spinLineWidth + 1 + + protected + 1 + + Resizable + + 1 wxSP_ARROW_KEYS|wxSP_WRAP + 0 wxFILTER_NONE @@ -640,23 +921,51 @@ wxALIGN_CENTER_VERTICAL|wxALL 0 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY mils + + 0 + 0 + 1 m_staticLineWidthUnits + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -696,23 +1005,51 @@ wxALIGN_CENTER_VERTICAL|wxALL 1 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Default text &size: + + 0 + 0 + 1 m_staticText7 + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -752,25 +1089,53 @@ wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND 0 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY 0 + 1000 + 0 0 + 0 + 1 m_spinTextSize + 1 + + protected + 1 + + Resizable + + 1 wxSP_ARROW_KEYS|wxSP_WRAP + 0 wxFILTER_NONE @@ -812,23 +1177,51 @@ wxALIGN_CENTER_VERTICAL|wxALL 0 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY mils + + 0 + 0 + 1 m_staticTextSizeUnits + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -868,23 +1261,51 @@ wxALIGN_CENTER_VERTICAL|wxALL 1 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Repeat draw item &horizontal displacement: + + 0 + 0 + 1 m_staticText9 + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -924,25 +1345,53 @@ wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND 0 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY 0 + 500 + 0 -500 + 0 + 1 m_spinRepeatHorizontal + 1 + + protected + 1 + + Resizable + + 1 wxSP_ARROW_KEYS|wxSP_WRAP + 0 wxFILTER_NONE @@ -984,23 +1433,51 @@ wxALIGN_CENTER_VERTICAL|wxALL 0 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY mils + + 0 + 0 + 1 m_staticRepeatXUnits + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -1040,23 +1517,51 @@ wxALIGN_CENTER_VERTICAL|wxALL 1 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Repeat draw item &vertical displacement: + + 0 + 0 + 1 m_staticText12 + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -1096,25 +1601,53 @@ wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND 0 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY 100 + 500 + 0 -500 + 0 + 1 m_spinRepeatVertical + 1 + + protected + 1 + + Resizable + + 1 wxSP_ARROW_KEYS|wxSP_WRAP + 0 wxFILTER_NONE @@ -1156,23 +1689,51 @@ wxALIGN_CENTER_VERTICAL|wxALL 0 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY mils + + 0 + 0 + 1 m_staticRepeatYUnits + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -1212,23 +1773,51 @@ wxALIGN_CENTER_VERTICAL|wxALL 1 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY &Repeat label increment: + + 0 + 0 + 1 m_staticText16 + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -1268,25 +1857,53 @@ wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND 0 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY 1 + 10 + 0 0 + 0 + 1 m_spinRepeatLabel + 1 + + protected + 1 + + Resizable + + 1 wxSP_ARROW_KEYS|wxSP_WRAP + 0 wxFILTER_NONE @@ -1349,24 +1966,52 @@ wxALL|wxEXPAND 0 + 1 + 1 + 1 + 1 + + + 1 + 0 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Show g&rid + + 0 + 0 + 1 m_checkShowGrid + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -1406,24 +2051,52 @@ wxALL|wxEXPAND 0 + 1 + 1 + 1 + 1 + + + 1 + 0 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Show hi&dden pins + + 0 + 0 + 1 m_checkShowHiddenPins + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -1463,24 +2136,52 @@ wxALL|wxEXPAND 0 + 1 + 1 + 1 + 1 + + + 1 + 0 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Enable automatic &panning + + 0 + 0 + 1 m_checkAutoPan + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -1520,24 +2221,52 @@ wxALL|wxEXPAND 0 + 1 + 1 + 1 + 1 + + + 1 + 0 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Allow buses and wires to be placed in H or V &orientation only + + 0 + 0 + 1 m_checkHVOrientation + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -1577,24 +2306,52 @@ wxALL|wxEXPAND 0 + 1 + 1 + 1 + 1 + + + 1 + 0 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Show p&age limits + + 0 + 0 + 1 m_checkPageLimits + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -1649,23 +2406,51 @@ Template Field Names - 1 + 0 + 1 + 1 + 1 + 1 + wxSYS_COLOUR_BTNFACE + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY + + 0 + 0 + 1 m_panel2 + 1 + + protected + 1 + + Resizable + + 1 + 0 User defined field names for schematic components. wxFILTER_NONE @@ -1716,23 +2501,51 @@ wxALIGN_CENTER_HORIZONTAL|wxALL 0 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Please enter fieldnames which you want presented in the component fieldname (property) editors. Names may not include (, ), or " characters. + + 0 + 0 + 1 m_staticText211 + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -1799,23 +2612,51 @@ wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL 0 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Custom field 1 + + 0 + 0 + 1 m_staticText15 + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -1855,23 +2696,51 @@ wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND 0 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY + + 0 0 + 0 + 1 m_fieldName1 + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -1915,23 +2784,51 @@ wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL 0 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Custom field 2 + + 0 + 0 + 1 m_staticText161 + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -1971,23 +2868,51 @@ wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND 0 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY + + 0 0 + 0 + 1 m_fieldName2 + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -2031,23 +2956,51 @@ wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL 0 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Custom field 3 + + 0 + 0 + 1 m_staticText17 + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -2087,23 +3040,51 @@ wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND 0 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY + + 0 0 + 0 + 1 m_fieldName3 + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -2147,23 +3128,51 @@ wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL 0 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Custom field 4 + + 0 + 0 + 1 m_staticText18 + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -2203,23 +3212,51 @@ wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND 0 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY + + 0 0 + 0 + 1 m_fieldName4 + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -2263,23 +3300,51 @@ wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL 0 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Custom field 5 + + 0 + 0 + 1 m_staticText19 + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -2319,23 +3384,51 @@ wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND 0 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY + + 0 0 + 0 + 1 m_fieldName5 + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -2379,23 +3472,51 @@ wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL 0 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Custom field 6 + + 0 + 0 + 1 m_staticText20 + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -2435,23 +3556,51 @@ wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND 0 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY + + 0 0 + 0 + 1 m_fieldName6 + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -2495,23 +3644,51 @@ wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL 0 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Custom field 7 + + 0 + 0 + 1 m_staticText21 + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -2551,23 +3728,51 @@ wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND 0 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY + + 0 0 + 0 + 1 m_fieldName7 + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -2611,23 +3816,51 @@ wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL 0 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Custom field 8 + + 0 + 0 + 1 m_staticText22 + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -2667,23 +3900,51 @@ wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND 0 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY + + 0 0 + 0 + 1 m_fieldName8 + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE diff --git a/eeschema/dialogs/dialog_eeschema_options_base.h b/eeschema/dialogs/dialog_eeschema_options_base.h index a1cbb23f0d..48b3724baa 100644 --- a/eeschema/dialogs/dialog_eeschema_options_base.h +++ b/eeschema/dialogs/dialog_eeschema_options_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Sep 8 2010) +// C++ code generated with wxFormBuilder (version Nov 17 2010) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -101,7 +101,7 @@ class DIALOG_EESCHEMA_OPTIONS_BASE : public wxDialog public: - DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Schematic Editor Options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Schematic Editor Options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~DIALOG_EESCHEMA_OPTIONS_BASE(); }; diff --git a/eeschema/lib_arc.cpp b/eeschema/lib_arc.cpp index b5a27371eb..685f369a66 100644 --- a/eeschema/lib_arc.cpp +++ b/eeschema/lib_arc.cpp @@ -159,7 +159,7 @@ bool LIB_ARC::Load( char* aLine, wxString& aErrorMsg ) bool LIB_ARC::HitTest( const wxPoint& aRefPoint ) { - int mindist = m_Width ? m_Width / 2 : g_DrawDefaultLineThickness / 2; + int mindist = GetPenSize() / 2; // Have a minimal tolerance for hit test if( mindist < MINIMUM_SELECTION_DISTANCE ) @@ -172,6 +172,9 @@ bool LIB_ARC::HitTest( const wxPoint& aRefPoint ) bool LIB_ARC::HitTest( wxPoint aPosition, int aThreshold, const TRANSFORM& aTransform ) { + if( aThreshold < 0 ) + aThreshold = GetPenSize() / 2; + // TODO: use aTransMat to calculates parameters wxPoint relativePosition = aPosition; diff --git a/eeschema/lib_bezier.cpp b/eeschema/lib_bezier.cpp index 2a19718305..4f27a9c368 100644 --- a/eeschema/lib_bezier.cpp +++ b/eeschema/lib_bezier.cpp @@ -328,7 +328,7 @@ void LIB_BEZIER::drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& */ bool LIB_BEZIER::HitTest( const wxPoint& aRefPos ) { - int mindist = m_Width ? m_Width / 2 : g_DrawDefaultLineThickness / 2; + int mindist = GetPenSize() / 2; // Have a minimal tolerance for hit test if ( mindist < MINIMUM_SELECTION_DISTANCE ) mindist = MINIMUM_SELECTION_DISTANCE; @@ -346,6 +346,9 @@ bool LIB_BEZIER::HitTest( wxPoint aPosRef, int aThreshold, const TRANSFORM& aTra { wxPoint ref, start, end; + if( aThreshold < 0 ) + aThreshold = GetPenSize() / 2; + for( unsigned ii = 1; ii < GetCornerCount(); ii++ ) { start = aTransform.TransformCoordinate( m_PolyPoints[ii - 1] ); diff --git a/eeschema/lib_circle.cpp b/eeschema/lib_circle.cpp index e3a3d97261..e15f84493a 100644 --- a/eeschema/lib_circle.cpp +++ b/eeschema/lib_circle.cpp @@ -78,7 +78,7 @@ bool LIB_CIRCLE::Load( char* aLine, wxString& aErrorMsg ) */ bool LIB_CIRCLE::HitTest( const wxPoint& aPosRef ) { - int mindist = m_Width ? m_Width / 2 : g_DrawDefaultLineThickness / 2; + int mindist = GetPenSize() / 2; // Have a minimal tolerance for hit test if( mindist < MINIMUM_SELECTION_DISTANCE ) @@ -97,6 +97,9 @@ bool LIB_CIRCLE::HitTest( const wxPoint& aPosRef ) */ bool LIB_CIRCLE::HitTest( wxPoint aPosRef, int aThreshold, const TRANSFORM& aTransform ) { + if( aThreshold < 0 ) + aThreshold = GetPenSize() / 2; + wxPoint relpos = aPosRef - aTransform.TransformCoordinate( m_Pos ); int dist = wxRound( sqrt( ( (double) relpos.x * relpos.x ) + diff --git a/eeschema/lib_collectors.cpp b/eeschema/lib_collectors.cpp index 0b5b57f0bf..21d1baa1a4 100644 --- a/eeschema/lib_collectors.cpp +++ b/eeschema/lib_collectors.cpp @@ -101,7 +101,7 @@ SEARCH_RESULT LIB_COLLECTOR::Inspect( EDA_ITEM* aItem, const void* aTestData ) if( ( m_data.m_unit && item->GetUnit() && ( m_data.m_unit != item->GetUnit() ) ) || ( m_data.m_convert && item->GetConvert() && ( m_data.m_convert != item->GetConvert() ) ) - || !item->HitTest( m_RefPos, 2, DefaultTransform ) ) + || !item->HitTest( m_RefPos, -1, DefaultTransform ) ) return SEARCH_CONTINUE; Append( aItem ); diff --git a/eeschema/lib_draw_item.h b/eeschema/lib_draw_item.h index bcf27b9302..6aad4762b2 100644 --- a/eeschema/lib_draw_item.h +++ b/eeschema/lib_draw_item.h @@ -22,7 +22,7 @@ class LIB_PIN; extern const int fill_tab[]; -#define MINIMUM_SELECTION_DISTANCE 15 // Minimum selection distance in mils +#define MINIMUM_SELECTION_DISTANCE 2 // Minimum selection distance in internal units /** @@ -218,6 +218,9 @@ public: * @param aPosition - a wxPoint to test * @param aThreshold - max distance to this object (usually the half * thickness of a line) + * if < 0, it will be automatically set to half + * pen size when locating lines or arcs + * and set to 0 for other items * @param aTransform - the transform matrix * @return - true if the point \a aPosition is near this object */ diff --git a/eeschema/lib_field.cpp b/eeschema/lib_field.cpp index 3bdf2a25bb..4559fe7b76 100644 --- a/eeschema/lib_field.cpp +++ b/eeschema/lib_field.cpp @@ -349,6 +349,9 @@ bool LIB_FIELD::HitTest( const wxPoint& aPosition ) bool LIB_FIELD::HitTest( wxPoint aPosition, int aThreshold, const TRANSFORM& aTransform ) { + if( aThreshold < 0 ) + aThreshold = 0; + int extraCharCount = 0; // Reference designator text has one or 2 additional character (displays diff --git a/eeschema/lib_pin.cpp b/eeschema/lib_pin.cpp index 282026e177..97eb694206 100644 --- a/eeschema/lib_pin.cpp +++ b/eeschema/lib_pin.cpp @@ -531,6 +531,9 @@ bool LIB_PIN::HitTest( const wxPoint& aPosition ) bool LIB_PIN::HitTest( wxPoint aPosition, int aThreshold, const TRANSFORM& aTransform ) { + if( aThreshold < 0 ) + aThreshold = 0; + TRANSFORM transform = DefaultTransform; DefaultTransform = aTransform; @@ -1048,7 +1051,7 @@ void LIB_PIN::DrawPinSymbol( EDA_DRAW_PANEL* aPanel, /* Draw the pin end target (active end of the pin) */ BASE_SCREEN* screen = aPanel ? aPanel->GetScreen() : NULL; - #define NCSYMB_PIN_DIM TARGET_PIN_DIAM + #define NCSYMB_PIN_DIM TARGET_PIN_RADIUS if( m_type == PIN_NC ) // Draw a N.C. symbol { GRLine( clipbox, aDC, @@ -1064,7 +1067,7 @@ void LIB_PIN::DrawPinSymbol( EDA_DRAW_PANEL* aPanel, */ else if( screen == NULL || !screen->m_IsPrinting ) { - GRCircle( clipbox, aDC, posX, posY, TARGET_PIN_DIAM, 0, color ); + GRCircle( clipbox, aDC, posX, posY, TARGET_PIN_RADIUS, 0, color ); } } @@ -1504,7 +1507,7 @@ wxPoint LIB_PIN::ReturnPinEndPoint() const } -int LIB_PIN::ReturnPinDrawOrient( const TRANSFORM& aTransform ) +int LIB_PIN::ReturnPinDrawOrient( const TRANSFORM& aTransform ) const { int orient; wxPoint end; // position of pin end starting at 0,0 according to its orientation, length = 1 @@ -1816,7 +1819,8 @@ EDA_RECT LIB_PIN::GetBoundingBox() const int nameTextOffset = 0; bool showName = !m_name.IsEmpty() && (m_name != wxT( "~" )); bool showNum = m_number != 0; - int symbolY = TARGET_PIN_DIAM / 2; + int minsizeV = TARGET_PIN_RADIUS; + if( entry ) { @@ -1831,16 +1835,16 @@ EDA_RECT LIB_PIN::GetBoundingBox() const // First, calculate boundary box corners position int numberTextLength = showNum ? m_PinNumSize * GetNumberString().Len() : 0; - // Actual text height are bigger than text size + // Actual text height is bigger than text size int numberTextHeight = showNum ? wxRound( m_PinNumSize * 1.1 ) : 0; if( m_shape & INVERT ) - symbolY = INVERT_PIN_RADIUS; + minsizeV = MAX( TARGET_PIN_RADIUS, INVERT_PIN_RADIUS ); // calculate top left corner position // for the default pin orientation (PIN_RIGHT) - begin.y = numberTextHeight + TXTMARGE; - begin.x = MIN( -TARGET_PIN_DIAM / 2, m_length - (numberTextLength / 2) ); + begin.y = MAX( minsizeV, numberTextHeight + TXTMARGE ); + begin.x = MIN( -TARGET_PIN_RADIUS, m_length - (numberTextLength / 2) ); // calculate bottom right corner position and adjust top left corner position int nameTextLength = 0; @@ -1856,20 +1860,30 @@ EDA_RECT LIB_PIN::GetBoundingBox() const nameTextLength = ( m_PinNameSize * length ) + nameTextOffset; // Actual text height are bigger than text size - nameTextHeight = wxRound( m_PinNameSize * 1.1 ); + nameTextHeight = wxRound( m_PinNameSize * 1.1 ) + TXTMARGE; } - end.x = m_length + nameTextLength; - - end.y = -nameTextHeight / 2; - if( end.y > -symbolY ) - end.y = -symbolY; + if( nameTextOffset ) // for values > 0, pin name is inside the body + { + end.x = m_length + nameTextLength; + end.y = MIN( -minsizeV, -nameTextHeight / 2 ); + } + else // if value == 0: + // pin name is ouside the body, and above the pin line + // pin num is below the pin line + { + end.x = MAX(m_length, nameTextLength); + end.y = -begin.y; + begin.y = MAX( minsizeV, nameTextHeight ); + } // Now, calculate boundary box corners position for the actual pin orientation - switch( m_orientation ) + int orient = ReturnPinDrawOrient( DefaultTransform ); + + /* Calculate the pin position */ + switch( orient ) { case PIN_UP: - // Pin is rotated and texts positions are mirrored RotatePoint( &begin, wxPoint( 0, 0 ), -900 ); RotatePoint( &end, wxPoint( 0, 0 ), -900 ); @@ -1883,8 +1897,6 @@ EDA_RECT LIB_PIN::GetBoundingBox() const break; case PIN_LEFT: - - // Pin is mirrored, not rotated by 180.0 degrees NEGATE( begin.x ); NEGATE( end.x ); break; @@ -1893,8 +1905,13 @@ EDA_RECT LIB_PIN::GetBoundingBox() const break; } - begin = DefaultTransform.TransformCoordinate( begin + m_position); - end = DefaultTransform.TransformCoordinate( end + m_position); + // Draw Y axis is reversed in schematic: + NEGATE( begin.y ); + NEGATE( end.y ); + + wxPoint pos1 = DefaultTransform.TransformCoordinate( m_position ); + begin += pos1; + end += pos1; bbox.SetOrigin( begin ); bbox.SetEnd( end ); diff --git a/eeschema/lib_pin.h b/eeschema/lib_pin.h index 46baecb1ae..725ed44937 100644 --- a/eeschema/lib_pin.h +++ b/eeschema/lib_pin.h @@ -12,7 +12,7 @@ class SCH_COMPONENT; -#define TARGET_PIN_DIAM 12 /* Circle diameter drawn at the active end of pins */ +#define TARGET_PIN_RADIUS 12 /* Circle diameter drawn at the active end of pins */ #define DEFAULT_TEXT_SIZE 50 /* Default size for field texts */ #define PART_NAME_LEN 15 /* Maximum length of part name. */ @@ -169,7 +169,7 @@ public: * according to its orientation and the matrix transform (rot, mirror) \a aTransform * @param aTransform = transform matrix */ - int ReturnPinDrawOrient( const TRANSFORM& aTransform ); + int ReturnPinDrawOrient( const TRANSFORM& aTransform ) const; /** * Fill a string buffer with pin number. diff --git a/eeschema/lib_polyline.cpp b/eeschema/lib_polyline.cpp index 768a7f4e6e..0dcb99db1f 100644 --- a/eeschema/lib_polyline.cpp +++ b/eeschema/lib_polyline.cpp @@ -321,7 +321,7 @@ void LIB_POLYLINE::drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint bool LIB_POLYLINE::HitTest( const wxPoint& aPosition ) { - int mindist = m_Width ? m_Width / 2 : g_DrawDefaultLineThickness / 2; + int mindist = GetPenSize() / 2; // Have a minimal tolerance for hit test if( mindist < MINIMUM_SELECTION_DISTANCE ) @@ -334,6 +334,9 @@ bool LIB_POLYLINE::HitTest( wxPoint aPosition, int aThreshold, const TRANSFORM& { wxPoint ref, start, end; + if( aThreshold < 0 ) + aThreshold = GetPenSize() / 2; + for( unsigned ii = 1; ii < GetCornerCount(); ii++ ) { start = aTransform.TransformCoordinate( m_PolyPoints[ii - 1] ); diff --git a/eeschema/lib_rectangle.cpp b/eeschema/lib_rectangle.cpp index 9ed33af3a3..79a63d96d4 100644 --- a/eeschema/lib_rectangle.cpp +++ b/eeschema/lib_rectangle.cpp @@ -262,6 +262,9 @@ bool LIB_RECTANGLE::HitTest( const wxPoint& aPosition ) bool LIB_RECTANGLE::HitTest( wxPoint aPosition, int aThreshold, const TRANSFORM& aTransform ) { + if( aThreshold < 0 ) + aThreshold = GetPenSize() / 2; + wxPoint actualStart = aTransform.TransformCoordinate( m_Pos ); wxPoint actualEnd = aTransform.TransformCoordinate( m_End ); diff --git a/eeschema/lib_text.cpp b/eeschema/lib_text.cpp index c8547f097f..af0722bc8a 100644 --- a/eeschema/lib_text.cpp +++ b/eeschema/lib_text.cpp @@ -169,6 +169,9 @@ bool LIB_TEXT::HitTest( const wxPoint& aPosition ) bool LIB_TEXT::HitTest( wxPoint aPosition, int aThreshold, const TRANSFORM& aTransform ) { + if( aThreshold < 0 ) + aThreshold = 0; + wxPoint physicalpos = aTransform.TransformCoordinate( m_Pos ); wxPoint tmp = m_Pos; m_Pos = physicalpos; diff --git a/eeschema/sch_sheet.cpp b/eeschema/sch_sheet.cpp index 45ad12262f..c56e7a017c 100644 --- a/eeschema/sch_sheet.cpp +++ b/eeschema/sch_sheet.cpp @@ -502,14 +502,16 @@ wxPoint SCH_SHEET::GetSheetNamePosition() wxPoint SCH_SHEET::GetFileNamePosition() { wxPoint pos = m_Pos; + int margin = GetPenSize() + 4; + if( IsVerticalOrientation() ) { - pos.x += m_Size.x+4; + pos.x += m_Size.x + margin; pos.y += m_Size.y; } else { - pos.y += m_Size.y + 4; + pos.y += m_Size.y + margin; } return pos; diff --git a/packaging/windows/nsis/install.nsi b/packaging/windows/nsis/install.nsi index 7507f7e32a..3cbb72540e 100644 --- a/packaging/windows/nsis/install.nsi +++ b/packaging/windows/nsis/install.nsi @@ -17,7 +17,7 @@ ; General Product Description Definitions !define PRODUCT_NAME "KiCad" -!define PRODUCT_VERSION "2011.05.12" +!define PRODUCT_VERSION "2011.05.25" !define PRODUCT_WEB_SITE "http://iut-tice.ujf-grenoble.fr/kicad/" !define SOURCEFORGE_WEB_SITE "http://kicad.sourceforge.net/" !define COMPANY_NAME "" diff --git a/version.txt b/version.txt index 1b5f980f6d..d6728ca252 100644 --- a/version.txt +++ b/version.txt @@ -1,4 +1,4 @@ release version: -2011 may 12 +2011 may 25 files (.zip,.tgz): kicad-2011-05-12