Commit Graph

2432 Commits

Author SHA1 Message Date
Simon Richter e15ba3bf32 Add missing include directory
The common library uses CURL.
2017-01-27 07:38:23 -05:00
jean-pierre charras 981fddc649 Try to replace avhttp by Curl 2017-01-24 17:44:06 +01:00
jean-pierre charras 5127a6bd09 Fix an issue (from a patch of the master branch): slashes are not translated from \ in windows to / on unix
(see https://bugs.launchpad.net/kicad/+bug/16585)
2017-01-24 17:41:03 +01:00
Wayne Stambaugh 50a4b5553a Version string improvements.
Define empty string variable KICAD_BRANCH_NAME that can be used as an
optional version string element.  When git is used to build the version
string, this variable is set to the git branch name.  It can also be
defined at configuration time as an optional string appended to the
$KICAD_VERSION variable.

Define empty string variable KICAD_VERSION_EXTRA that can be set by
the user at configuration.

The variables KICAD_BRANCH_NAME and KICAD_VERSION_EXTRA are only
appended to KICAD_VERSION if they are set.  Otherwise, only KICAD_VERSION
is uses as the version string.

Update the developer building from source document to reflect the changes.
2016-11-28 09:15:04 -05:00
Chris Pavlina 4cb084cd63 Bring back KICAD_REPO_NAME 2016-11-24 13:03:35 -05:00
Jean-Noel Avila 18f77b894e Fix off-by-one in saving bitmaps 2016-11-09 09:53:47 +01:00
Wayne Stambaugh 9ca6405bcb Minor version string generation improvements.
Remove the KICAD_REPO_NAME option from the main cmake file and the
generated config.h file since it is no longer used.

Set the default branch name to "undefined" in CreateGitVersionHeader.cmake
instead of the KICAD_REPO_NAME option.

Remove generating KICAD_FULL_VERSION from CreateGitVersionHeader.cmake
and add it to WriteVersionHeader.cmake so that the default settings and
the new KiCadVersion.cmake definitions can be used to generate the full
version string as well.

Check to see if the branch name is set and only use the version to
generate the full version string.  This allows the use of the KiCad
version cmake file to create a version only string like "4.0.4" with
no trailing branch name.

Change build_version.cpp to use the full version string rather than
concatenating the version and branch strings.
2016-10-14 08:09:13 -04:00
Chris Pavlina 6dbe262b53 Update version string formatting after git migration
It is no longer necessary (or sensible) to include a simulated bzr
revision number, and we can reliably get a branch name now. Therefore,
the new version strings look like:

(2016-08-26 revision 67230ac)-master
 |                   |        |
 |                   |        branch name, "HEAD" if not on a branch,
 |                   |          or "unknown" if no .git present
 |                   |
 |                   abbreviated commit hash, or no-git if no .git
 |                     present
 |
 date of commit, or date of build if no .git present

Signed-off-by: Chris Pavlina <pavlina.chris@gmail.com>
2016-10-12 20:32:38 -04:00
Maciej Suminski 115d70e060 Fixed a crash when drawing a single point polyline 2016-09-29 09:55:42 -04:00
Simon Wells 3b4cdd96ab Hide OpenGL scrollbars on OS X to fix freeze. (fixes lp:1553428) 2016-08-09 15:07:17 -04:00
Maciej Sumiski 9d233b4cdb Pcbnew: fixed a crash when dragging a line was interrupted. (fixes lp:1606332)
* Crash was caused by removing an element from m_activeTools list, causing other
  iterators to be invalidated when dragging line in GAL mode.
2016-08-09 09:54:57 -04:00
Jean-Pierre Charras 7aca6174d6 Fix window positioning bug when context menu is open. (fixes lp:1606378)
* When a context menu was open and a left mouse click event in the window title
  bar occurred, the window would shift from the title bar click position to the
  context menu select position.  This only seemed to effect windows.
2016-08-05 10:46:36 -04:00
Michael Steinberg 5f98fc0591 Fix dangling board reference crash in GAL. (fixes lp:1584489) 2016-08-05 08:49:12 -04:00
Jean-Pierre Charras 26c5485be9 Pcbnew: OSX dialog fixes. 2016-07-15 16:51:28 -04:00
Maciej Sumiski 48d2ac15d5 Fix a GAL crash bug caused by invalid iterator (thanks to Michael Steinberg).
* TOOL_MANAGER::finishTool() caused iterator to become invalid when an
  element was removed from the m_activeTools deque.
2016-07-09 12:33:37 -04:00
Bernhard Stegmaier 6c25b29e9f Fix touchpad scrolling on OSX (merge of rev. 6606 from development branch). 2016-07-04 21:47:33 +02:00
Bernhard Stegmaier 1f6789e692 Add support for optional touchpad panning (merge of rev. 6586 from development branch). 2016-07-04 21:43:55 +02:00
Bernhard Stegmaier e4307a86cc OSX: legacy canvas rendering speed improvements.
* Enables USE_WX_GRAPHICS_CONTEXT for OSX by default. This shouldn't be a
  major change because it seems to get used on OSX behind the scenes anyway.
  As a side effect, this might improve behavior with anti-aliasing because
  KiCad shifts drawing by (0.5, 0.5) into the middle of the virtual pixels so
  things may be less blurry. It will still build without enabling
  USE_WX_GRAPHICS_CONTEXT, but the optimizations obviously won¡¯t be used.
* The optimizations currently only are effective when USE_WX_GRAPHICS_CONTEXT
  is enabled and OSX. They might be also good for other platforms using
  USE_WX_GRAPHICS_CONTEXT because it aggregates some drawing primitives using
  paths wxGraphicsContext provides.
* It adds some #ifdefs for disabling the wxGraphicsContext stuff when
  USE_WX_GRAPHICS_CONTEXT isn't enabled. If you hate #ifdefs, this also
  could be dropped but then it will always check if wxGraphicsContext can be
  applied.
2016-06-30 16:51:24 -04:00
jean-pierre charras 535f3ae006 Fix a (minor) issue in Kicad manager: when the schematic editor or the board editor are run from the project tree frame to edit files of the current project, editors are opened on the background. 2016-06-21 11:26:59 -04:00
jean-pierre charras 90ed0183c8 Fix an issue in LOCALE_IO class, used to switch to/back locale "C" when reading/writing files: the back to locale was broken, and created issues in countries using the ',' as fp separator, especially when the non default language was used.
It was reported in many bugs.
2016-06-21 10:48:42 -04:00
Simon Wells 7179a71cdc Multiple monitor loses window when single monitor 2016-05-27 16:46:24 -04:00
jean-pierre charras 7940f0773c Try to fix a compil issue on OSX (no viable conversion from 'const wxString' to 'const wxChar *', in colors.cpp). 2016-05-27 16:22:11 -04:00
Dick Hollenbeck 226d56433c Remove support for in processing setting of ld library path. 2016-05-27 15:31:09 -04:00
jean-pierre charras 3c233ae08e Make color names translatable in color selection dialog. 2016-05-27 15:23:00 -04:00
Collin Anderson 7dbf84a9bd Fix beep on hotkey press in OS X 2016-05-27 14:53:10 -04:00
Chris Pavlina 91f34a9478 Add support for PCB and footprint format versioning
Currently, kicad_pcb files have a (version ...) tag, but it is ignored. This
commit does the following:

1. Parse the version. If it's later than the last supported version, present an
alternative error message suggesting an upgrade if the file does not load
correctly. The version will be interpreted as an integer YYYYMMDD to suggest
a KiCad release date.

2. Accept a (version ...) tag also in kicad_mod files, but do not write them
yet. If no version tag is present in these files, assume the version to be that
of the current format version at the time of this commit.

This is meant to be merged to the 4.x stable series, and preps for KiCad 5
which will start emitting version tags also in footprints - users with what
will then be 'old stable' will not get a parse error when we introduce this for
footprints, and we can safely increment the format version later.
2016-05-27 14:36:53 -04:00
Matthew Petroff 67ab1be495 Correct multiple UI spelling errors. 2016-05-03 12:44:32 -04:00
jean-pierre charras 6a33549b68 Gerber files: ensure the "level polarity dark" is set in each file (this is the default, but ensuring that is better and can avoid issues when panneling files) 2016-04-15 14:24:25 -04:00
Wayne Stambaugh ab99c58ead Fix quasi-modal dialog mode in DIALOG_SHIM class.
* Add event handler to check all button clicks for default command event
  IDs and handle them appropriately by either calling EndQuasiModal() or
  passing the event up the event handler chain to allow the default dialog
  handlers to perform their magic.
* Add event handler to handle the close window event properly.
* Add scope brackets so the wxBusyCursor will stop being displayed when
  the footprint library loading is complete in CvPcb.
2016-04-12 18:22:01 -04:00
Wayne Stambaugh c8daccbe0e CvPcb: remove footprint library load failure limit. (fixes lp:1553756)
* Remove the artificial footprint library read error limit to prevent
  potentially readable libraries from being loaded after the error limit
  is reached.
* Change error message dialog to an HTML dialog so that potentially large
  error messages can be displayed with scrolling and the ability to copy
  and paste the error message for bug reporting purposes.
* Add busy cursor when loading the footprint libraries so the user has some
  idea that something is happening while the footprint libraries are being
  loaded.
2016-04-11 14:15:26 -04:00
Wayne Stambaugh 4a665f492e Undo cached container commit. 2016-04-07 15:18:19 -04:00
jean-pierre charras a0d41f75ff OpenGL mode: Disable frequent (and not very usefull) memory deallocation/reallocation to avoid "out of memory" issue due to heap fragmentation (noticeable only with large boards).
Note: there is still this issue when switching back legacy mode and to Opengl mode because the heap is still freed and reallocated.
2016-04-07 14:56:16 -04:00
Wayne Stambaugh 8191327fc2 Eeschema: fix illegal field characters causing corrupt schematic files on Linux. (fixes lp:1529358)
* Refactor edit one field dialogs to use validators and transfer data to and
  from window functions.
* Add code to DIALOG_SHIM to handle validation and transfer functions since
  the base dialog class code is not called by EndQuasiModal().
* Add custom validator class for filtering field text control characters.
* Add new field validator to edit schematic component dialog field text
  control.
* Add new field validator to edit fields in library editor dialog field
  text control.
* Make a few LIB_PART member functions const.
2016-04-07 14:32:53 -04:00
Chris Pavlina a19a52398a Fix graphics rendering on RTL systems (lp:1559545)
* wxWidgets mirrors graphics by default on RTL systems so it is necessary to
  individually set graphics canvases to LTR mode to avoid this.
2016-03-23 14:38:00 -04:00
jean-pierre charras 1d55823fef Page layout reader fixes.
* Fix a minor issue in parseGraphic method to ensure correct parenthesis balance.
* Update a old (incorrect) .kicad_wks file in demo.
* page_layout_writer.cpp: remove a few useless spaces in output files.
2016-03-22 11:35:16 -04:00
Mark Roszko 62475d0464 PL Editor: fix page layout default description missing parenthesis before the keyword "end" in a few lines. 2016-03-22 11:32:03 -04:00
dwilches 963b4d5ed6 Fix Preferred Editor dialog (lp: 1558353)
The functions involved in the problem were PGM_BASE::GetEditorName and
EDA_BASE_FRAME::OnSelectPreferredEditor:

1) OnSelectPreferredEditor showed a dialog to allow the user selecting the
editor, but before that called GetEditorName to get the name of the current
editor (to show as a default in the choose file dialog).

2) The problem was when there was no editor, GetEditorName showed its own
dialog.

3) So the user was seeing first the dialog from (2) and then the dialog from
(1).

4) As GetEditorName is used in many other places the solution I did was to add
to it an optional parameter that tells it what to do if no editor is set. To
avoid modifying other code that relies on the current behaviour, this parameter
has a default value that causes to show the dialog. But now when
OnSelectPreferredEditor calls it, it passes the parameter that causes it to
return an empty string if no editor was set.

5) Also, I found a second bug while doing it which allowed in the first dialog
to select an unexistent file (the dialog was missing the wxFD_FILE_MUST_EXIST
flag).

6) Lastly, to avoid having duplicated code (the one that showed the same dialog
and that configured the wildcard was in two methods) I created a single
function that now both functions call: PGM_BASE::AskUserForPreferredEditor.
This way we also will have consistency in the behaviour of both dialogs and
there is a single place where it needs to be modified.
2016-03-18 08:11:19 -04:00
jean-pierre charras cc058033cc 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 16:30:32 -05:00
jean-pierre charras 6d3e1b9391 Fix environment variable initialization issue on Linux. (fixes lp:1550620)
* Linux environment variables are not initialized properly if the value
  contains any non ASCII7 characters and if the locale is not set.  Set
  the locale before reading the environment variable configuration.
2016-03-01 08:53:19 -05:00
Tomasz Wlostowski 79fe4a0acb More accurate pushout force calculation for circle-segment collisions. (fixes lp:1551579) 2016-03-01 08:44:02 -05:00
Nick Winters ab0e3d0ce2 OSX: fix bug caused by wxBitmap drawing 0 width or heigth bitmap. (fixes lp:1529159) 2016-02-23 09:05:52 -05:00
Bernhard Stegmaier a773ecc735 Disable FPS limiter for OSX (GAL). 2016-02-18 11:29:12 -05:00
jean-pierre charras e9bfcc28c3 Fix HPGL plot divide by zero bug. 2016-02-11 19:12:06 -05:00
Maciej Suminski 3cdac44ac2 GAL::DrawPolygon() and GAL::DrawPolyline() variants that work with VECTOR2D array. 2016-02-11 19:05:24 -05:00
jean-pierre charras 48435c5cb3 Fix bug in "User Custom" size selection in"Page Settings" in non English languages. (fixes lp:1536427) 2016-02-09 18:41:47 -05:00
Tomasz Wlostowski 42aa93e34b GAL: apply grid offset when board is loaded and respect grid color setting. (fixes lp:1533168) 2016-02-09 18:27:13 -05:00
Simon Wells c66656c5d4 Open PDF viewer improvements. (fixes lp:1530162)
* Fix broken ExecuteCommand() when path contains spaces on OSX.
* Only use system defined mime type for PDF files.
* Remove system dependent fallback applications for opening PDF files.
2016-02-08 20:03:57 -05:00
Jean-Pierre Charras 509e71fdb3 Pcbnew: fix bug when flipping a block that dosesn't flip inner layers nor their connected microvias. (fixes lp:1527446) 2016-02-08 19:16:07 -05:00
Jean-Pierre Charras 6c5e2f3900 Pcbnew: avoid crash if something is wrong when opening the Python Console (for instance missing python module). 2016-02-07 19:38:08 -05:00
Chris Pavlina f46272bed9 Pcbnew: fix zone tool bug when minimum width is compared against thermal relief spoke when Pad connection set to none. (fixes lp 1526158) 2016-02-07 19:35:43 -05:00