Commit Graph

4566 Commits

Author SHA1 Message Date
jean-pierre charras fde2cfee27 Minor changes: remove a few local shadowed local variables detected using " -Wshadow" gcc compil option ( No bug, just a better code readability ) and fix minor coding style issues. 2016-04-18 20:15:44 +02:00
Patrick Pereira b846a98199 Pcbnew: improve footprint edge plot logic. 2016-04-18 11:48:39 -04:00
Wayne Stambaugh 46ff5a2580 Pcbnew: remove dead macro code. 2016-04-18 11:03:59 -04:00
Cirilo Bernardo 6120472d60 3D file name resolver improvements.
* Paths defined via pcbnew->Preferences->Configure Paths are now included in
  the 3D file browser's drop-down list except for KICAD_PTEMPLATES, KIGITHUB,
  KISYSMOD, any paths resembling a URL, and any non-existent paths. When an
  absolute path is shortened using one of these path aliases, let's say
  'KISYS3DMOD' then the name appears in the pcb file as "${KISYS3DMOD}/blah.wrl".
  If a user defines and actual environment variable with the same name, then
  that user defined variable will have precedence over the internally defined
  variable.

* Paths relative to the current project directory are no longer represented
  as "some/path/to/file.wrl".  For compatibility with previous KiCad versions
  it shall always be stored as ${KIPRJMOD}/some/path/to/file.wrl.

* Various restrictions on alias path values have been removed since the
  imposed restrictions could result in corrupted user data as aliases are
  silently dropped.

* Overall the patch should improve back-compatibility by providing a ${ENV_VAR}
  mechanism for supporting different model root directories and ensuring that
  paths relative to KIPRJMOD are expressed in a way that is compatible with
  earlier KiCad versions. This allows users more flexibility and the ability
  to work in a way that ensures 3D model files can be correctly resolved in
  earlier versions of KiCad. Users who do not care about back-compatibility
  may prefer to use the newer alias system.
2016-04-17 18:35:32 -04:00
Chris Pavlina ff3d22dcd9 Remove DIALOG_ORIENT_FOOTPRINTS 2016-04-17 10:11:14 -04:00
jean-pierre charras bcd345c29f Fix issues in dialog drc: because it is not modal, DRC parameters and unit selection can be modified outside the dialog, still opened. Now, the new parameters are taken in account.
Fixa also a corner case which crashes Pcbnew: if the dialog is opened, and the board was  changed (reloaded, cleared),  pcbnew crashed because many pointers stored in dialog  become invalid. Now the dialog is just closed.
2016-04-15 20:15:22 +02:00
Chris Pavlina 36b53a50e9 Fix signedness in a couple comparisons (warning suppression) 2016-04-12 19:18:42 -04:00
Chris Pavlina 48573712e8 Exterminate another 0.1deg field 2016-04-12 19:18:33 -04:00
jean-pierre charras 95962cd2ba Very minor changes: minor coding style fixes, and remove a few local shadowed variables (mainly local variables having the same name in the same function) detected using " -Wshadow" gcc compil option ( No bug, just a better code readability ) 2016-04-12 17:50:42 +02:00
Chris Pavlina 9e3fd5b762 Nuke 0.1deg units in DIALOG_GRAPHIC_ITEM_PROPERTIES 2016-04-11 10:27:32 -04:00
Chris Pavlina 4d77388216 Clean up wxValidator window association
wxValidator::SetWindow was used too many times due to me being a dunderhead who
can't read the docs.
2016-04-10 18:28:06 -04:00
Chris Pavlina 8325d6fdf0 Eliminate 0.1deg units in DIALOG_PAD_PROPERTIES 2016-04-10 18:14:28 -04:00
Chris Pavlina 0a6583f902 Eliminate 0.1deg units in DIALOG_MODULE_BOARD_EDITOR 2016-04-10 08:59:23 -04:00
Chris Pavlina 4fe676753a dialog_edit_module_text: fix display bugs
Displayed angle should be clamped to -90..90, 0 should not be displayed as
blank text, and locale should be used for initial rendering.
2016-04-10 08:23:44 -04:00
jean-pierre charras f294834f4d dialog_pad_properties: Some fixes. Dialog_edit_module_text: fix an issue related to displayed texts, which were deleted and replaced by the unit symbol only, and the name of the parameter was therefore lost. 2016-04-10 12:40:31 +02:00
Chris Pavlina 3ac5fc41cc Refactor dialog_edit_module_text and nuke the 0.1 degrees 2016-04-09 16:17:19 -04:00
Chris Pavlina f12d87b800 Adjust spacing in dialog_edit_module_text 2016-04-09 10:32:46 -04:00
Patrick Pereira 342ba51e6d Allow arbitrary angles for footprint field texts 2016-04-08 19:18:44 -04:00
jean-pierre charras 5e41763d83 Fix a few Coverity warnings and typo is dialogs 2016-04-07 13:09:31 +02:00
jean-pierre charras 4a838fb8c3 Pcbnew: Add rounded rect pad shape. 2016-04-06 20:15:49 +02:00
jean-pierre charras d18cdf1c53 merge 3d_initial_merge branch 2016-04-05 19:56:01 +02:00
unknown b8a91c7a98 Enhancements in Create array tool (bad parameters detection and disable parms when not applicable) 2016-04-02 14:52:29 +02:00
Baranovskiy Konstantin f3ee0b8252 Pcbnew: prevent zone tool from switching to no tool when deleting zone corner. 2016-03-22 13:47:29 -04:00
jean-pierre charras 99d18faca9 Change the way main editor frames are managed by Kicad: before this change, they had the Kicad manager frame as parent frame, and it creates a few issues:
- When the Kicad manager is iconized, all other child frames are iconized (normal wxWidgets behavior)
- For viewer frames in modal mode, there is a more annoying issue: they have the wxFLOAT_ON_PARENT frame style on unix, and wxSTAY_ON_TOP on Windows.
wxFLOAT_ON_PARENT frame style is incorrect (although on most WM it works) because the parent frame (Kicad manager Frame) is not the caller. It is usually a main editor frame.
It does not work on Windows (wx STAY_ON_TOP is used).
* Now each editor frame has a null parent.
Therefore iconizing the Kicad manager frame does not iconize other frames.
* Viewer frames have null parent in normal mode and the caller parent in modal mode (therefore wxFLOAT_ON_PARENT frame style is always and correctly used)
* References to opened/closed main frames are no more managed by the (complicated) kicad code. Instead of, a non critical and more easy to understand code just uses FindWindowByName to know if a main window exists or not.

These changes do not fix all issues about Kicad frames brought to the foreground or the background, but it fixes a few issues, and AFAIK do not add other issues.
2016-03-21 17:36:06 +01:00
Cirilo Bernardo 44a75e6f69 Sync to main branch r6634 2016-03-21 13:38:47 +11:00
Cirilo Bernardo a4ba01f42d Various fixes to DXF import
The attached patch makes the following changes to import DXF:

1. correctly implements scaling based on DXF $INSUNITS -
at least where INSUNITS is sensible. I ignore units like miles,
gigameters, AU, lightyear, parsec ...

2. correctly implements LWPolylines, adding an ARC segment
rather than a line segment when bulge != 0.  A number of users
have been complaining about getting the wrong board shape
(chamfered corners rather than rounded corners) on DXF Import,
now they shouldn't complain.
2016-03-20 21:33:53 -04:00
jean-pierre charras 6e93672760 Icons: remove not used icons. 2016-03-20 18:52:15 +01:00
Jon Neal 00f9dbd095 Change misspelled dxf conversion constant from member variable to static const like other conversion constants 2016-03-19 23:51:02 -04:00
Chris Pavlina 60d93d024c pcbnew: don't pick up selection after unsuccessful Duplicate
Following rev 6627 (git 2777182), if a non-duplicatable item was the object of
a Duplicate action, the original item would be picked up, potentially
misleading the user into thinking something was actually duplicated.
2016-03-18 07:15:50 -04:00
Chris Pavlina fd1d7ecb6e pcbnew: fix Duplicate assertion in legacy also (lp:1558913)
Do not assert that the item to be duplicated can be duplicated, just don't
duplicate it. The user can trigger a Duplicate on items that aren't
duplicatable, like field texts - he'll figure out that they can't be duplicated
when they aren't, no need to deliver a scary warning and risk an abort.
2016-03-18 06:49:49 -04:00
Chris Pavlina 2777182a2c pcbnew: fix Duplicate assertion
Do not assert that the item to be duplicated can be duplicated, just don't
duplicate it. The user can trigger a Duplicate on items that aren't
duplicatable, like field texts - he'll figure out that they can't be duplicated
when they aren't, no need to deliver a scary warning and risk an abort.

TODO: Don't pick up the duplicated selection if none of the items in it were
actually duplicated, it's misleading.
2016-03-18 06:28:11 -04:00
Jon Neal d66cc0fedc Fix one click dialog footprint spreading picking up extra footprints. 2016-03-17 23:09:24 -04:00
Tomasz Włostowski aa5a1d1898 PCB updater: spread footprints after updating netlist 2016-03-16 23:05:08 -04:00
jean-pierre charras 5de85450b8 Pcbnew: Dialog list and select net: better dialog and make net selection to highlight a net working on GAL. 2016-03-16 15:14:00 +01:00
Wayne Stambaugh b7c974b2c4 MinGW64 build warning fixes.
* On MinGW64 and possibly other 64-bit platforms, time_t is defined as a long
  long unsigned integer but all of the scanf and printf format specifiers used
  to save and load the schematic files are %lX which is a long unsigned integer
  which causes compile warnings.  Add casts and temporary variables to eliminate
  the compile type warnings.
2016-03-14 14:20:19 -04:00
Cirilo Bernardo 968a18a859 Sync with main branch r6620 2016-03-14 19:00:24 +11:00
jean-pierre charras 44fc6cb337 Fix issue: "Malformed footprint causes crash on load" (in fact, no crash: just an assert dialog is shown) 2016-03-13 16:39:18 +01:00
unknown 3ba4226cb2 pcbnew: fix exception when import pcad pcb with zero size pads: zero size pads are now just ignored. 2016-03-13 11:41:14 +01:00
Simon Wells 145cd47d5c Move copy version information code to about dialog. 2016-03-11 11:40:24 -05:00
jean-pierre charras 99e81aeb9c Fix incorrect (too small) bounding box EDA_TEXT, noticeable when chars like j or { are used in zone fill functions.
I tried to merge some constants used both in legacy mode and gal mode (which were, before this patch, separate constants).
There is still a serious work to avoid different calculation code for the same text in draw and plot functions.
Work in progress to merge these calculation functions.
2016-03-11 13:08:34 +01:00
Cirilo Bernardo ec580cff50 Sync to main branch r6614 2016-03-11 09:37:12 +11:00
Chris Pavlina 3fd179cd10 pcbnew: remove dead legacy save code 2016-03-08 15:49:25 -05:00
jean-pierre charras b237d81b75 Create Array dialog: some fixes:
*  No initial copied object changed (this was a serious bug to modify these objects. Previous version modified references and other texts using a very stupid algorithm).
  It also fixes bug 1549231
* only new pads are numbered (therefore renumbering is used only in footprint editor)
*  remove not working and useless feature in circular array: now  only use number for pads (others options using alphabetical letters are removed: did not work corectly, and were useless)
* a more clear option is used to choose if the pads are numbered from a choosen value, or from the first avaible value
* Adding a warning messsage if a parameter is incorrect.
2016-03-07 08:13:06 +01:00
Cirilo Bernardo 317ec48e1b Sync with main branch r6608 2016-03-05 10:00:32 +11:00
jean-pierre charras ba038ac507 Pcbnew, File menu: break Open (board) into 2 menu items: Open (only for Kicad board files) and Import (only for non Kicad board files) 2016-03-04 19:48:08 +01:00
Cirilo Bernardo dbe54067f9 Reverted/reworked BoardEdtor_base and Modedit_base *.fbp files to wx3.5-RC1 version due to bug in -RC2 2016-03-02 13:36:24 +11:00
Cirilo Bernardo d0a2080823 Merge with main branch r6601 2016-03-01 11:44:15 +11:00
Wayne Stambaugh bd800630be Pcbnew: prevent delete hot key from deleting locked footprints. (fixes lp:1538805) 2016-02-29 16:12:03 -05:00
Simon Wells 4d2a05856f Minor CMake configuration file fixes.
* Move add_directory()s in main CMakeList.txt after all find_package()
  macros are run so all flags in the main CMakeList.txt are propagated
  to the sub-folder CMakeList.txt files.
* Remove commented out include of config.h
* Make the link maps only build on linux as -${TO_LINKER},-cref
  -${TO_LINKER},-Map=blah just gives warnings on osx w/ clang
* Make the link maps only build with flag -DKICAD_MAKE_LINK_MAPS is
  defined during CMake configuration as they are highly specific.
* Moved the code for setting link maps into the main CMakeList.txt
  file to avoid duplication.
* Removed -D__ASSERTMACRO__ from osx as its no longer needed
* Removed a couple of other OSX only things that wouldn't work anyway
* Moved set (BU_CHMOD_BUNDLE_ITEMS) to the main CMakeList.txt as
  otherwise it would only work for the KiCad build not the other
  applications
* Made KICAD_SCRIPTING_MODULES enable KICAD_SCRIPTING as currently if
  you have modules enabled without the scripting base it will on build.
  This could be changed to a fatal error saying you need to also enable
  scripting but it seems unnecessary.
* Removed duplication of pcbnew.py install code under modules and
  scripting since you can't have modules without scripting now
2016-02-29 14:08:03 -05:00
Cirilo Bernardo 4d20f32fd0 Added 'Configure Paths' button to Footprint Properties editors 2016-02-28 10:17:58 +11:00