Commit Graph

469 Commits

Author SHA1 Message Date
Martin Aberg 47a4099e64 Disable logging at exit on FreeBSD.
This commit fixes a crash on KiCad exit for FreeBSD.

Usage of the wxLog functions in destructors on program generates an
infinite recursive call loop and segfault on this platform.

The workaround is inpired by:
  https://people.freebsd.org/~wpaul/kicad/kicad_instructions.txt

Fixes: lp:1778334
* https://bugs.launchpad.net/kicad/+bug/1778334
2018-06-23 15:11:32 +02:00
John Beard 58814e838d Common: Fix -Wcatch-value warnings (catching exceptions by value)
This fixes some warnings on GCC 8.1:

warning: catching polymorphic type ‘class std::out_of_range’ by value [-Wcatch-value=]
         catch( std::out_of_range )
                     ^~~~~~~~~~~~

This fix is along the same lines as:

* ff1802d7a "Fix Coverity "Big parameter passed by value" warnings"
2018-06-05 11:46:17 +02:00
Wayne Stambaugh ff1802d7a1 Fix Coverity "Big parameter passed by value" warnings.
Fixes Coverity CIDs:

- 175846
- 175841
- 175840
- 175837
- 175836
- 175834
- 102524
2018-06-04 12:30:00 -04:00
Wayne Stambaugh 5678a166ee Fix template path bugs.
Remove KICAD_PTEMPLATE environment variable as it's purpose was not
clear and was often poorly defined as the path to the KiCad installed
templates.

Add a new KICAD_TEMPLATE_DIR environment variable which clearly should
be the path of the KiCad installed templates.  Make this environment
variable available in the user settings in case the default is wrong
which has been the case in some instances.  Use the standard search
stack to set the default system template path which has a much greater
chance of being correct.

Add a new KICAD_USER_TEMPLATE_DIR environment variable which clearly
should be the path of the user defined templates.  Users most likely
were not even aware of the old default user path unless they read the
fine manual.

Set template path search stack priority as follows:

* KICAD_USER_TEMPLATE_DIR
* KICAD_TEMPLATE_DIR
* Search stack template paths

Reverse template selection dialog and project path dialog for improved
user experience.

Fixes lp:1543443

https://bugs.launchpad.net/kicad/+bug/1543443
2018-05-20 18:56:11 -04:00
Shivpratap Chauhan 26197c333e At very first launch, old settings/config does not exist
KiCad read incorrect value for window position and it's size at very
first launch, which results in invisble/inaccessible window on Mac OSX.
Set correct default values for these settings fixes this issue.
And fix a typo in comment.
2018-05-01 09:19:27 -04:00
Seth Hillbrand 3d76fcaa3b Standardize colons in kicad template dialog 2018-04-23 13:15:02 -07:00
jean-pierre charras e9ef555c6a Use Ctrl+F1 to display hotkey list also in Gerbview and Kicad manager 2018-04-14 17:12:28 +02:00
Jeff Young baef22df9a Fix memory leak and push menu change to other apps.
Fixes: lp:1761848
* https://bugs.launchpad.net/kicad/+bug/1761848
2018-04-07 14:14:55 +01:00
Jon Evans c6e6134ebd Set appropriate parent for new directory checkbox
Fixes: lp:1754731
* https://bugs.launchpad.net/kicad/+bug/1754731
2018-03-25 10:25:40 -04:00
Jon Evans 5b653c0c1e Update MacOS icons
Fixes: lp:1750284
* https://bugs.launchpad.net/kicad/+bug/1750284
2018-03-22 11:45:42 -04:00
Wayne Stambaugh 620c2af356 KiCad: fix template folder load bug.
Add a check to see if the folder selected by the user contains a
project template meta data folder and use that folder instead of
assuming that it is a folder containing sub-folders with project
templates.  The normal behavior is preserved when no meta data
folder is detected.

Fixes lp:1751465

https://bugs.launchpad.net/kicad/+bug/1751465
2018-03-19 12:49:57 -04:00
jean-pierre charras 827b818b5d Very minor fixes in Gerbview and Kicad:
Gerbview: fix X2 z order display of Adhesive (Glue) layers.
Kicad: very minor cosmetic enhancement in Create Project dialog.
2018-03-18 16:04:23 +01:00
Jeff Young fb31bc1ca7 Add separators to kicad window.
Fixes: lp:1750409
* https://bugs.launchpad.net/kicad/+bug/1750409
2018-03-15 19:14:49 +00:00
Seth Hillbrand 2e12175c13 Spelling Plese -> Please 2018-03-09 09:43:54 -08:00
Seth Hillbrand 583ee0e4c3 Standardize Favourite -> Favorite 2018-03-08 12:33:32 -08:00
Maciej Suminski 49486b83b0 Add "create a new directory" checkbox to the Create Project dialog
Fixes: lp:1753325
* https://bugs.launchpad.net/kicad/+bug/1753325
2018-03-06 16:22:46 +01:00
Maciej Suminski 1f078f533b Refactor Eagle project import to use Kiway::ExpressMail() 2018-03-04 16:45:42 +01:00
Russell Oliver 9016344bb3 Eagle Schematic Import: Fix netlist mapping for zones and vias. 2018-03-04 16:45:11 +01:00
Jeff Young 63e113740b Fix copy/paste compile error on Mac. 2018-02-23 14:10:06 +01:00
Michael 1e7275c712 Kicad: Minor menubar changes 2018-02-22 20:43:10 -05:00
Maciej Suminski 9e80eff90a Eagle importer: two stage netlist update
After Eagle project import, schematic and board netlists are inconsistent:
footprints do not have sheetpaths assigned, schematics are unannotated.

One can update netlist either by references or timestamps, but timestamps
are empty in pcbnew, and updating by reference must by preceded by
annotation which may lead to broken links between board and schematics
(Eagle does not require references to end with a number, so KiCad annotater
will add numbers in such cases).

To fix the problem, there is a two step netlist update:
- update by reference without the annotation step, to assign
correct sheetpaths to footprints
- update by timestamp, after symbols are annotated, in order to
update references in the board

Fixes: lp:1748502
* https://bugs.launchpad.net/kicad/+bug/1748502
2018-02-16 19:37:23 +01:00
Jeff Young e2f82118a2 Rebuild project tree when unarchiving into project dir.
Fixes: lp:1749955
* https://bugs.launchpad.net/kicad/+bug/1749955
2018-02-16 16:01:32 +01:00
Jeff Young 1afbfad44a Use "..." uniformly in menus.
See the bug report for some wording changes and a couple of
menu restructurings that were also cleaned up.

Fixes: lp:1597827
* https://bugs.launchpad.net/kicad/+bug/1597827
2018-02-10 17:32:28 -05:00
jean-pierre charras a088ea84fd Rename files 2018-02-07 14:16:05 +01:00
jean-pierre charras eb9070fa74 forgotten fix after renaming files 2018-01-30 13:31:50 +01:00
jean-pierre charras 8552f3fedf fix code after renaming files 2018-01-29 22:00:44 +01:00
jean-pierre charras 5d72aebd22 Fix code after renaming files 2018-01-29 16:40:22 +01:00
Jeff Young 947a4839fd Use generic Save (and New and Open) commands where unambiguous.
Fixes: lp:1743426
* https://bugs.launchpad.net/kicad/+bug/1743426
2018-01-16 08:39:12 -05:00
jean-pierre charras 6b9740e681 Fix issues when in Pcbnew the Update PCB from schematic command is run.
Now, if not yet opened, the schematic editor frame is created, and shown iconized.
(although iconize it is perhaps not the best option)

It fixes a few (minor) issues (when the schematic editor frame is created, but not shown):
- On OSX the schematic frame is shown as a "ghost" frame.
- If later, the schematic editor is opened from Kicad, a message saying the schematic is already opened is shown.
This is technically true, but unexpected by user.
- If symbols need an annotation, the annotation dialog is opened, can can modify the schematics.
  So it could be better to really open the schematic editor frame.
2018-01-16 13:53:03 +01:00
Oliver 195b85b0c5 Cleanup of KiCad Icons
Major cleanup of many icons (started as a simple effort to tweak libedit and modedit icons)
Ref: https://lists.launchpad.net/kicad-developers/msg32860.html
* Each application icon has been updated
* Consolidated icon "modifiers" across many icons
* Replaced confusing arrows with "load" and "save" icons
* Slight code updates to reference correct icons
* Consolidate multiple representations of single icon type(s)
2018-01-12 14:06:45 -05:00
Chris Pavlina 7e6a6540c8 Implement primitive icon scaling for high DPI
This is meant as a stopgap for 5.0, with plans to add proper scaled
icons in the 6.0 cycle. A function KiScaledBitmap() is added, which
works like KiBitmap() except it scales the bitmap according to the
calling window's font size. Controls have been added to all the main
applications to let the user select scaling manually (these were omitted
from smaller apps that didn't already have a place to put them).

In addition, in eeschema only, the pixel height of the system font is
shown in the options dialog for diagnostics. This is only for collecting
feedback before 5.0 release from users with different displays and will
be removed.
2018-01-10 21:26:06 -07:00
Camille f5f7ba4746 Fix loop variable copy in for-range loop, use const reference instead 2018-01-09 19:18:44 -05:00
Camille 9ff66a5274 Fix unnecessary value parameter detected by clang-tidy. - Replace value parameter by const reference parameter or move-assignement in some cases 2018-01-09 18:55:51 -05:00
Camille 3168d03fe5 Fix unnecessary copy initialization detected by clang-tidy 2018-01-09 18:22:10 -05:00
Simon Richter a9ccf1161b Fix quotes in UI messages
This replaces all single and angle bracket quotes in UI messages with
double quotes, for consistency.

Sorry to all translators.
2017-12-15 07:33:07 -05:00
Maciej Suminski 542040c474 Enable active project flag after importing an Eagle project
When active project flag is disabled, the application buttons are
disabled in the main launcher window. It usually happens when 'kicad'
runs without any project preloaded.
2017-11-23 10:33:40 +01:00
jean-pierre charras 821c02af3c Kicad, menu Browse/Open Local file : shows all files by default, because all kicad files are editable ASCII files. 2017-11-22 09:43:29 +01:00
jean-pierre charras 8507ea45fc Add a dialog to edit/change components LIB_ID inside a schematic.
This is useful for instance after moving a symbol from a lib to an other lib.
2017-11-21 11:52:40 +01:00
jean-pierre charras 31083a4060 Better menu item label and tool tip.
Modify incorrect menu label.

Fixes: lp:1733113
https://bugs.launchpad.net/kicad/+bug/1733113
2017-11-19 10:49:28 +01:00
Wayne Stambaugh 753f24aaaa Fix Eagle project import bug on Linux.
There is a significant difference in the behavior of wxFileDialog
between Windows and Linux (GTK+).  On windows, wxFileDialog will
return the path chosen even if no file is selected.  On Linux,
wxFileDialog returns the default path when no file is selected.  This
caused the destination path to be the same path as the source which
was causing the issue.  Use wxDirDialog instead so the selected path
is returned.

Fixes lp:1732759

https://bugs.launchpad.net/kicad/+bug/1732759
2017-11-18 12:28:59 -05:00
Wayne Stambaugh 652b969193 GTK+ file dialog wildcard improvements.
The GTK+ file dialog is case sensitive however it does support regular
expressions.  Most of the file dialog wildcards are lower case so only
files with the lower case extensions will show up in the file dialog.
This code adds a method to convert file extensions of any case to the
appropriate (sch -> [sS][cC][hH]) regular expression on GTK+ builds so
all file extension case combinations will show up in the file dialog.

A note to developers: make sure to add a file extension when setting
when setting the default file argument.  If you do don't set an
extension, the GTK+ file dialog will happily append the regular
expression as the file extension which is surely not what you want.

There are still a few known places (mostly gerbview) where there are
some complex wildcard code that has not been converted.

Fixes lp:1720542

https://bugs.launchpad.net/kicad/+bug/1720542
2017-11-11 19:32:26 -05:00
Marvin Schmidt 69974b73db Remove some extra semicolons 2017-11-09 19:52:18 +01:00
Russell Oliver 2a0a999350 Eeschema Eagle Import: Code clean-up and formatting 2017-10-20 09:34:32 +02:00
Russell Oliver 3b0855d204 Eagle Project Import: Code cleanup and documentation.
- Also makes the project and file import functions filetype dependent.
- The change from IO_MGR::KICAD to IO_MGR::KICAD_SEXP removes a conflict from a compile definition for KICAD when compiling kicad/import_project.cpp
2017-10-20 08:58:40 +02:00
Russell Oliver 869743d573 Kicad Eagle Project Import Improvements. -- schematic and board files are both visible in file selection dialog. -- Allows for the selection of either the board or schematic file. -- silently fails on not detecting the corrosponding board or schematic file. -- all new kicad files are generated in new project directory -- Silently read netlist without generating annotation warnings which synchronises timestamps and paths based on given eagle references, otherwise renumbering schematic references will break links accross schematic and pcbnew. 2017-10-20 08:58:40 +02:00
Russell Oliver 433aa653fe Kicad: Add Project import function. -- add menu entry -- add ImportFile kiway function -- expose functions for creating/reading netlist -- add example eagle boad file as well 2017-10-20 08:38:42 +02:00
Maciej Suminski 068a29952c Changed AUI toolbars background from gradient to solid
Based on patches from Windsor Schmidt <windsor.schmidt@gmail.com>
2017-09-27 23:23:06 +02:00
jean-pierre charras 4e8ad8516a Update gerber job file format and job file extension.
Gerber job file extension is now .gbrjob, according to latest changes in Gerber job file spec.
2017-09-20 18:14:20 +02:00
Fabrizio Tappero d2d665e540 library option reviewed and renamed, minor menu text changes 2017-09-19 08:11:24 -04:00
Seppe Stas 3b7fbad1b9 Improve template selector for macOS
Fixes: lp:1492577 (and probably also lp:1672116).
*https://bugs.launchpad.net/kicad/+bug/1492577
*https://bugs.launchpad.net/kicad/+bug/1672116

- Fixes a race condition causing the wrong page to be selected in
  `OnPageChange`
- Allows the validate path and browse button to refresh the
  template page even when the path was not changed. This is needed
  since on OSX the page needs to be active for the templates to be
  rendered.
2017-09-18 16:40:50 +02:00