Commit Graph

3053 Commits

Author SHA1 Message Date
jean-pierre charras 5868202c28 rename files, mainly files for plotter control 2018-01-28 18:13:27 +01:00
Martin Sivak d5cdd78062 eeschema: keystroke zoom should obey disabled centering
Keystroke zoom (F1/F2) always centered the screen, because it
was handled as ID_POPUP_ZOOM_IN event. Mousewheel scrolling
was ok, because it is handled using different event based
on the configuration.

This patch introduces special event ids for keystroke
zooming that are then properly translated to either
ID_POPUP_ZOOM_IN or ID_OFFCENTER_ZOOM_IN depending
on the configuration.

The same issue is fixed for legacy canvas pcbnew.

Fixes: lp:1742567
* https://bugs.launchpad.net/kicad/+bug/1742567

Signed-off-by: Martin Sivak <mars@montik.net>
2018-01-27 20:20:32 -05:00
Jeff Young 7a28f3d4cf Implement undo/redo for origins in legacy
PICKED_ITEMS_LIST knows the architecture of the undo commands so
that it can delete those ITEMs which it owns.  This represents poor
encapsulation so instead of adding yet another case, I added a
UR_TRANSIENT item flag which is set by callers whenever they create
new objects to “give to” the undo/redo stack.  This allowed some
cleanup of other code, but cleaning up UR_DELETE and UR_WIRE_IMAGE
will be a bigger task and have to wait for another day.

Fixes: lp:1542018
* https://bugs.launchpad.net/kicad/+bug/1542018
2018-01-27 19:51:44 -05:00
Jeff Young 4784ee7fe4 Implement undo/redo for drill and grid origins.
The undo/redo operations are essentially the same as for
UR_CHANGED: we store both the origin marker item and a copy
of it and flip back and forth between the two.  This also
required the implementation of clone() for the markers.

The ORIGIN_VIEWMARKER is moved from being a subclass of
EDA_ITEM to BOARD_ITEM to facilitate the use of a UR_CHANGE-
like implementation without having to know the internals
of the ORIGIN_VIEWMARKER.

In the command processors, the setting of the origins is
broken into two parts: one for UI-level access which includes
setting up undo, and one for low-level access which does not.
The undo/redo code itself of course uses the lower level.

Fixes: lp:1542018
* https://bugs.launchpad.net/kicad/+bug/1542018
2018-01-27 19:40:51 -05:00
Maciej Suminski b8ecc95d9c Forward context menu events to the tool that created the menu
It fixes the case when a tool sets up a menu and starts its event loop
waiting exclusively for menu events. If none arrived, the tool was stuck
in the loop forever.

Fixes: lp:1744915
* https://bugs.launchpad.net/kicad/+bug/1744915
2018-01-26 15:53:52 +01:00
Seth Hillbrand 7a2d9dff62 Sets additional conditions for when a wire is trimmed
This adds a set of conditions that will prevent a wire from being
automatically trimmed.  Wires that are currently being moved or are
newly created or are explicitly avoided will not be removed.  This also
adds a function to set a flag on items in a block.

Fixes: lp:1744632
* https://bugs.launchpad.net/kicad/+bug/1744632
2018-01-24 19:47:14 -05:00
jean-pierre charras 270a63daac DRAWSEGMENT, S_POLYGON shape: remove useless copies or conversion to std::vector<wxPoint> of SHPE_POLY_SET polygon shape.
Rename GetPolyPoint() to BuildPolyPointsList(), because GetPolyPoint() looks like an accessor, but it is not an accessor.
(Using it as accessor can creates a *very long calculation time* for very basic access to polygon vertices)

Fixes: lp:1745050
https://bugs.launchpad.net/kicad/+bug/1745050
2018-01-24 14:22:43 +01:00
Maciej Suminski 121e670508 TEXT_CTRL_EVAL: Close the parent dialog after pressing Enter
Fixes: lp:1744721
* https://bugs.launchpad.net/kicad/+bug/1744721
2018-01-23 11:49:39 +01:00
Maciej Suminski da305e7750 Move SwitchCanvas() implementation to EDA_DRAW_FRAME
Share more code between pcbnew and gerbview. Fix warnings regarding
shadowing EDA_DRAW_FRAME::SwitchCanvas().
2018-01-22 09:06:55 +01:00
jean-pierre charras 1db14d44b7 Better calculation of polygon clearance area of oval pads. Wip. 2018-01-20 19:34:50 +01:00
Jeff Young cba430deab Fix undo/redo and revert for libedit name changes and aliases
Three interrelated issues:
1) Implement an undo/redo type for renames so that we know to delete
the old lib entry and add a new lib entry
2) When doing so (for the undo/redo OR the original edit), we must
make a copy of the 'original' LIB_PART which is used for revert, and
hand it to the new lib entry
3) When comparing a modified component tree item with the current item
we must also check for aliases.

Fixes: lp:1743857
* https://bugs.launchpad.net/kicad/+bug/1743857

Fixes: lp:1744371
* https://bugs.launchpad.net/kicad/+bug/1744371

Fixes: lp:1744373
* https://bugs.launchpad.net/kicad/+bug/1744373
2018-01-20 11:20:22 +01:00
jean-pierre charras 2e83103c3d WIDGET_NET_SELECTOR: speedup the net list creation.
Add comments and better names for variables.
2018-01-19 11:01:42 +01:00
Maciej Suminski d87a7ae58e Fallback to Cairo when OpenGL is not supported
Fixes: lp:1741787
* https://bugs.launchpad.net/kicad/+bug/1741787
2018-01-18 10:17:06 +01:00
Jon Evans b21f301097 Defer canvas type setting save until destruction of EDA_DRAW_FRAME
Fixes: lp:1741787
* https://bugs.launchpad.net/kicad/+bug/1741787
2018-01-18 10:17:06 +01:00
jean-pierre charras 47d392d83e Fix incorrect name (typo) of a method. 2018-01-18 10:11:45 +01:00
jean-pierre charras 6014307d06 Pcbnew, DRC dialog: Fix a few issues:
Gal mode: graphic cross-air cursor moved on items when clicking on & DRC error, like in legacy mode.
Make popup menu shown when right clicking on a DRC error item working.
2018-01-17 15:36:04 +01:00
Maciej Suminski d85cf732b6 TEXT_CTRL_EVAL: Evaluate expressions when Enter key is pressed
Fixes: lp:1741320
* https://bugs.launchpad.net/kicad/+bug/1741320
2018-01-16 14:53:13 +01:00
jean-pierre charras 433b2bff40 Add comments in progress_reporter.h; Remove unused parameter in Fill_All_Zones and remove empty file. 2018-01-16 10:22:25 +01:00
Jon Evans 6eb5733a0b LSET::UIOrder and LSET::Technicals now match layer widget order
Fixes: lp:1673792
* https://bugs.launchpad.net/kicad/+bug/1673792
2018-01-15 10:08:30 +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
jean-pierre charras 79a9f401a3 Fix a minor issue in pad editor dialog: in GAL mode, the pad was sometimes shown in outline mode, sometimes in filled mode
Fixes: lp:1740668
https://bugs.launchpad.net/kicad/+bug/1740668
2018-01-12 19:58:32 +01:00
Jon Evans 5fd1236d7a Use worksheet bounding box when the board is empty
Fixes: lp:1742140
* https://bugs.launchpad.net/kicad/+bug/1742140
2018-01-11 11:28:19 +01:00
jean-pierre charras 47dfabc6c8 Add size control to HTML_MESSAGE_BOX. Fix incorrect default size of a few dialogs.
Clean code: remove useless code and not used parameters.
2018-01-11 10:48:52 +01: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
Maciej Suminski 7f9202842d Fix an initialization order warning in coroutine.h 2018-01-10 08:52:17 +01: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
Chris Pavlina 6cee19d37d eeschema: neatly wrap placeholder text in symbol chooser 2018-01-07 19:30:56 -07:00
Chris Pavlina 445fc0000f COLOR_SWATCH, INDICATOR_ICON: DPI-independent scaling 2018-01-07 09:28:47 -07:00
Chris Pavlina 13bc706518 Fix several dialogs with bad default sizing
- Add helper methods for DPI-independent sizes
- Make splitter sashes visible on macOS
- Remove SetSizeInChars() - wx has a built-in way that I missed
- DIALOG_CHOOSE_COMPONENT: DPI-indep splitter sizes
- DIALOG_RESCUE_EACH: DPI-indep default size and sensible HTML window
  size
- COMPONENT_TREE: DPI-indep sizing
- DIALOG_FP_LIB_TABLE, DIALOG_SYMBOL_LIB_TABLE
2018-01-06 14:39:17 -07:00
Jeff Young 38227161bf Fix drawing of transparent layer swatches.
Also fixes a related bug to redraw holes when changing the
pcb background colour.

Fixes: lp:1741049
* https://bugs.launchpad.net/kicad/+bug/1741049

Fixes: lp:1741101
* https://bugs.launchpad.net/kicad/+bug/1741101
2018-01-06 12:12:39 -05:00
Mark Roszko b98cc0b937 Some coverity fixes 2018-01-05 22:51:03 -07:00
Chris Pavlina 57fe3739ca Symbol chooser: base default size on font for DPI flexibility 2018-01-05 22:02:05 -07:00
Jeff Young 658d181ec7 Don't capture cursor if zone or polygon cancelled.
If the client tool indicates it isn't happy for us to continue
(because, for instance, the user has cancelled the Zone Properties
dialog), then make sure we don't capture the mouse.

Fixes: lp: 1740780
* https://bugs.launchpad.net/kicad/+bug/1740780
2018-01-04 13:10:37 -05:00
Jon Evans 2dec95b4e6 Add a first-run dialog to encourage user to switch to OpenGL 2018-01-04 10:14:40 -05:00
jean-pierre charras 6bb349e933 Better management of KIWAY_PLAYER frame when called in modal mode, and having the wxFLOAT_ON_PARENT style option.
(previously, did not use the actual parent)
2018-01-01 10:41:43 +01:00
Jeff Young 88f23f17c1 Fix dialog OK button event issues on OSX.
Move the OSX dialog fix ups later so they come after some wxWindow
deferred processing.

Also provides a facility for doing a selectAll in each text field
so that tabbing between text fields behaves correctly.

Fixes: lp:1599157
* https://bugs.launchpad.net/kicad/+bug/1599157
2017-12-29 08:14:41 -05:00
Jeff Young 8a21641639 Eeschema: fix block copy and cut command event handlers.
Popup menu IDs must be between START_RANGE and END_RANGE to get bound to
the right event handler.

Fixes: lp:1667730
* https://bugs.launchpad.net/kicad/+bug/1667730
2017-12-28 16:12:33 -05:00
jean-pierre charras 992820f722 shape_line_chain ans shape_poly_det: add Rotate() geometric transform, useful for DRAWSEGMENT transforms 2017-12-22 10:54:47 +01:00
Oliver Walters 900ddca0b4 Changed default text size to 50mils
- Text size is now always written to file
- Unspecified text sizes are read as 60mils

Fixes lp:1737878

https://bugs.launchpad.net/kicad/+bug/1737878
2017-12-21 12:16:57 -05:00
Oliver Walters 5c6c60def4 Remove custom font from lib_table_grid
Fixes: lp:1738617
* https://bugs.launchpad.net/kicad/+bug/1738617
2017-12-21 09:35:52 +01:00
jean-pierre charras 3183fcb4bc Fix minor compil warnings (some are for old compilers). 2017-12-18 19:52:44 +01:00
Tomasz Włostowski a4528988ca pcbnew: fix graphical polygon movement, rotation, flipping and edit points synchronization.
Fixes: lp:1738449
* https://bugs.launchpad.net/kicad/+bug/1738449

Fixes: lp:1738032
* https://bugs.launchpad.net/kicad/+bug/1738032
2017-12-18 18:25:45 +01:00
Maciej Suminski f039e0bb6d Eagle parser: declare Convert() specialization for wxString in eagle_parser.h 2017-12-18 17:45:40 +01:00
Bernhard Stegmaier 02d1b2611e Remove wx-3.1 only constructor from HIDPI_GL_CANVAS wrapper. 2017-12-18 16:26:01 +01:00
Bernhard Stegmaier 19d7112fa2 Merge HIDPI_GL_CANVAS wrapper with OPENGL_GAL implementation. 2017-12-18 16:26:01 +01:00
Bernhard Stegmaier 909d95b5be Create HIDPI_GL_CANVAS wrapper for transparent wxGLCanvas HiDPI/Retina support. Enable HiDPI/Retina for 3d-viewer. 2017-12-18 16:26:01 +01:00
jean-pierre charras 1f78de409f Define "template<> struct hash<wxString>" in Kicad only if wxWidgets version < 3.1.0, because it is already defined in 3.1.0 2017-12-18 09:53:14 +01:00
Maciej Suminski 2e00169ae7 Explicitly cast wxString to std::string when throwing std::exception 2017-12-17 20:17:02 +01:00
Maciej Suminski 378846c2e3 Eagle Schematics Importer: support for UTF-8
Fixes: lp:1736083
* https://bugs.launchpad.net/kicad/+bug/1736083
2017-12-17 19:54:21 +01:00
Maciej Suminski 812b8b081d Implemented std::hash<wxString> specialization
Thanks to that wxString objects can be stored in certain
STL containers, e.g. unordered_map.
2017-12-17 18:45:40 +01:00
Maciej Suminski a13c89c83d Removed old debug output 2017-12-17 18:43:43 +01:00
Seth Hillbrand 6f3e55d344 wx: Add double-click handling in disambiguation cases
Fixes: lp:1154020
* https://bugs.launchpad.net/kicad/+bug/1154020
2017-12-15 16:32:19 -05:00
Tomasz Włostowski 75b21d010b pcbnew: more thread (and nested wx event loop) safety for the zone filling/connectivity algo 2017-12-14 23:49:46 +01:00
jean-pierre charras a287748921 Cosmetic enhancement: Add icons to track length tuner menu. 2017-12-14 14:33:20 +01:00
Tomasz Włostowski eed924fe45 Fixed zone filling crash & thermal stubs inconsistency
Fixes: lp:1737557
* https://bugs.launchpad.net/kicad/+bug/1737557
Fixes: lp:1737542
* https://bugs.launchpad.net/kicad/+bug/1737542
Fixes: lp:1737541
* https://bugs.launchpad.net/kicad/+bug/1737541
2017-12-14 01:29:08 +01:00
Tomasz Włostowski 2831268b60 PROGRESS_REPORTER: KeepRefreshing shouldn't block on non-OpenMP systems
Fixes: lp:1737277
* https://bugs.launchpad.net/kicad/+bug/1737277
2017-12-14 01:26:41 +01:00
Andreas Buhr 084eea6781 Bugfix: EDA_RECT to BOX2I generated wrong boxes
The "operator BOX2I() const" of EDA_RECT produced
wrong boxes, usually much to big. It passed its
end-position as second argument to the constructor
of BOX2I. However, BOX2I expects its size as second
argument.

This caused a dramatic performance penalty in some
cases.
2017-12-11 09:48:13 +01:00
Jon Evans 6ee26fdd8c Remove LAYER_WORKSHEET from forced visibility since it now has a control
Fixes: lp:1737315
* https://bugs.launchpad.net/kicad/+bug/1737315
2017-12-10 17:41:00 -05:00
jean-pierre charras 4c4b11b45f change UTF8& operator+=( wchar_t ch ) to UTF8& operator+=( unsigned ch ), because swig does not like wchar_t.
(on Linux, wchar_t is a unsigned int, on Windows a unsigned short, so always using a unsigned int do not create issues)
2017-12-08 17:57:53 +01:00
Andreas Buhr b33bf2eafe fix double free and memory leak in SHAPE_POLY_SET
There were two problems in the triangulation caching
of SHAPE_POLY_SET:
First there was a double free:
While SHAPE_POLY_SET implements the copy constructor,
it did not implement the operator=, which resulted
in the default operator= being generated by the
compiler. The default operator= copied the member
m_triangulatedPolys, which is a std::vector of pointers.
So after operator= execution, there are two SHAPE_POLY_SET
having pointers to the same TRIANGULATED_POLYGONs, each
of them deleting them in their destructors. This led
to segfaults, because calling
TransformShapeWithClearanceToPolygon on a Zone
uses operator= to copy the contained SHAPE_POLY_SET.
The new SHAPE_POLY_SET then went out of scope and
deleted the cached triangulation within the Zone.

This first problem is fixed by implementing operator=
for SHAPE_POLY_SET.

Second, there was a memory leak: Calling
"CacheTriangulation" on a SHAPE_POLY_SET,
then changing the polygon and then calling
"CacheTriangulation" again led to
leaking the
triangulations generated in the first call.

This second problem is fixed by holding
the cached triangulations in a unique_ptr.
2017-12-08 14:55:46 +01:00
jean-pierre charras d958ab9460 Fix operator+= for UTF8 class
Added operator+=(wchar_t), as operator+=(char) was not sufficient to
handle multibyte characters present in UTF8.

Fixes: lp:1737143
* https://bugs.launchpad.net/kicad/+bug/1737143
2017-12-08 14:37:55 +01:00
Maciej Suminski 9da8398cf3 Added files missing in 602ecf75 2017-12-07 18:14:19 +01:00
Maciej Suminski 602ecf7502 Fix overbar display in OpenGL canvas
Moved the code handling text overbars to a single function
(ProcessOverbars()) to replace similar pieces of code trying to do the
same thing.

Fixes: lp:1735906
* https://bugs.launchpad.net/kicad/+bug/1735906
2017-12-07 17:58:54 +01:00
jean-pierre charras bfc3804115 Minor fixes related to timestamp_t. Move timestamp_t definition to base_struct.h 2017-12-07 13:33:59 +01:00
Henner Zeller 3f57fa5d24 Change time_t in the functions that deal with timestamps to a new typedef timestamp_t (defined as a long).
that makes sure the c++ side and swigged Python side agree on the type, because time_t create problems in Python scripts.
2017-12-07 13:16:33 +01:00
Simon Richter 227afe77c0 Avoid C-style array member init (illegal in C++)
This is not part of the C++ language, and only supported in some compilers.
2017-12-06 19:28:17 -05:00
Simon Richter eaa31dc11b Avoid initialization from non-constexpr
In-class initializers for "static const" class members must be constexpr,
however std::string is only "static const" itself and cannot be used
without compiler extensions.
2017-12-06 19:27:53 -05:00
Tomasz Włostowski 7ad436c7aa pcbnew: now PROGRESS_REPORTER should work in multi-threaded context under Windows... 2017-12-05 14:54:57 +01:00
Tomasz Włostowski 4bf90f9717 WX_PROGRESS_REPORTER: fixed windows build error 2017-12-05 14:54:57 +01:00
Tomasz Włostowski 8df299a6bc pcbnew: Optimized zone filling algorithm: code cleanup 2017-12-05 14:54:57 +01:00
Tomasz Włostowski 58ce865352 pcbnew: made TransformShapeWithClearanceToPolygon virtual 2017-12-05 14:54:57 +01:00
Tomasz Włostowski dbdf085555 SHAPE_FILE_IO: default constructor outputs to stdout 2017-12-05 14:54:57 +01:00
Tomasz Włostowski 316ddadec1 pcbnew: Optimized zone filling algorithm. 2017-12-05 14:54:57 +01:00
Seth Hillbrand 76dbbfdf92 Eeschema: Clarify disambiuation of entry types
Replace the disambiguation menu entry for
wire2bus and bus2bus entries with their menu icon.
2017-12-01 08:19:52 +01:00
Wayne Stambaugh a74bad1630 About dialog fixes.
Remove developer email addresses as requested on the developers mailing
list.

Update source contributor list.

Add place holders for symbol and footprint library contributors.

Remove unnecessary wxT() macros.
2017-11-29 18:06:01 -05:00
jean-pierre charras 68268973b7 To avoid mistakes between graphic layers for pads, holes and not plated holes, rename 3 GAL_LAYER_ID names:
LAYER_NON_PLATED to LAYER_NON_PLATEDHOLES
LAYER_PADS_HOLES to LAYER_PADS_PLATEDHOLES
LAYER_PADS to LAYER_PADS_TH
and add comments and fix a render issue in gal mode for non plated holes.
2017-11-29 09:48:41 +01:00
Maciej Suminski 769611b79e Do not ask for confirmation to open Properties dialog for a locked footprint
Opening Properties dialog normally does not ask the user to confirm the
action, even for locked items. The exception was a case when there was
nothing selected and Properties dialog was invoked via its hot key -
then SELECTION_TOOL::RequestSelection() tried to get the item under the
cursor, verifying the lock flag.

Fixes: lp:1734537
* https://bugs.launchpad.net/kicad/+bug/1734537
2017-11-28 17:35:46 +01:00
Jon Evans 0564d3456b Preserve color scheme when switching to legacy (Fixes lp:1670669)
Instead of modifying the colors when switching to legacy canvas,
they will now be preserved and only returned as the "legacy" colors.
2017-11-28 10:47:04 +01:00
jean-pierre charras 11eb8aa098 Minor changes in EDA_RECT to facilitate python scripts
3 EDA_RECT members were returned by reference by their accessors, now they are returned by value.
It avoid constraints when using them, especially when mixing Python and C++ in scripts.
2017-11-27 19:47:58 +01:00
Maciej Suminski 1c4056e17a TEXT_CTRL_EVAL: wxTextCtrl wrapper supporting math expression evaluation 2017-11-24 21:15:40 +01:00
Michael Geselbracht b5fc6e45cf Numeric expression evaluator 2017-11-24 21:15:40 +01:00
Maciej Suminski 579d3f478d Renamed WX_UNIT_BINDER to UNIT_BINDER and moved to common/widgets
WX_ prefix should reserved for classes provieded by wxWidgets.
2017-11-24 21:15:40 +01:00
Julius Schmidt 9df938484a support "disable autopan" with gal canvas
Fixes: lp:1670712
* https://bugs.launchpad.net/kicad/+bug/1670712
2017-11-24 12:20:15 +01:00
jean-pierre charras 37f68f824b minor cosmetic enhancement: menu "Edit Components to Symbol Library Links": add specific icon. 2017-11-24 10:19:23 +01:00
Wayne Stambaugh b82bd8e0c5 Fix symbol names with illegal library ID characters.
Change the legacy schematic plugin to preserve illegal LIB_ID characters
when load schematics prior to version 4.

Check for illegal LIB_ID symbol names during project rescue.  Rename and
rescue any symbols with illegal LIB_ID names.

Add static methods to LIB_ID object for testing for and fixing names
with illegal characters so there is uniform code for doing so.

Update the Eagle plugin symbol loader to fix symbol names using the new
LIB_ID fix illegal names method.

Fixes lp:1732236

https://bugs.launchpad.net/kicad/+bug/1732236
2017-11-23 10:52:55 -05:00
Wayne Stambaugh 78366f8f0b Revert commit bc0306ba as it did not fix the issue. 2017-11-22 15:54:18 -05:00
Wayne Stambaugh bc0306ba99 Fix a possible bug in path normalization code.
The NormalizePath() function always added a trailing separator when
normalizing environment variables.  Now it checks an environment
variable for a trailing separator and only adds one if it doesn't
already exist.

May be a partial fix for:

Fixes lp:1733217

https://bugs.launchpad.net/kicad/+bug/1733217
2017-11-21 19:05:23 -05:00
Maciej Suminski 28608b1b52 Changed DIALOG_MULTIPLE_OPTIONS to use wxCheckListBox class 2017-11-21 23:18:55 +01:00
Maciej Suminski 6400e31d5b Library Editor: more coherent icons for part import/export 2017-11-21 23:18:55 +01:00
Maciej Suminski a4f475c97d Library Editor: icon improvements
- new icons: 'save part', 'add library'
- added a toolbar icon for 'add library'
- made icons on toolbar and menu consistent
2017-11-21 23:18:55 +01:00
Maciej Suminski 19a85a36a3 confirm: Added Select{Single,Multi}Option() to display generic selection dialogs 2017-11-21 23:18:55 +01:00
Maciej Suminski 5d8ed65675 Search Tree icon 2017-11-21 23:18:55 +01:00
Oliver f567d6aef8 Improved LIB_TABLE rendering
- Moved "Active" to first column
- Changed text attributes for disabled rows
2017-11-21 08:19:00 -05:00
Oliver f85ce87e44 Toggle LIB_TABLE_ROW enabled/disabled in grid editor
- Checkbox editor for enabled / disabled status
2017-11-21 08:18:17 -05:00
Oliver 7cdb78e852 Added "enabled" parameter for LIB_TABLE_ROW
- Read and write from lib-table working
2017-11-21 08:18:06 -05:00
Maciej Suminski 33cf082c41 Fixed library path resolution in Spice netlist exporter
SEARCH_STACK is a deprecated method for getting the list of paths where
one could look for a file. Instead it tries the project path and
environmental variables.
2017-11-19 11:38:57 +01:00
Maciej Suminski 759359f602 Moved path normalization functions to a separate file
Normalizing paths to environmental variables might be useful in
many places, therefore it is better to keep them accessible.
2017-11-18 20:05:08 +01:00
jean-pierre charras bdc6a5950b rename plot_common.h to class_plotter.h, a better name, consistent with other class definitions. 2017-11-16 15:53:30 +01:00
jean-pierre charras 2ec3a46984 Add support of DRAWSEGMENT S_POLYGON shape to plot functions.
Fixes: lp:1732570
https://bugs.launchpad.net/kicad/+bug/1732570
2017-11-16 12:09:24 +01:00
Tomasz Włostowski b76a6210c5 pcbnew: fixed stuck cursor when ForceCursorPosition() is active and cursor is moved by keyboard arrows
Fixes: lp:1729301
* https://bugs.launchpad.net/kicad/+bug/1729301
2017-11-16 00:43:23 +01:00
jean-pierre charras f68d829f54 very minor I18n fix 2017-11-15 20:28:44 +01:00
Seth Hillbrand 13ef1a911f Eeschema: Adding dashed line support to DXF plot
NEW: Dashed, dotted and dash-dot line support to DXF plot
in eeschema.
2017-11-15 08:10:51 +01:00
Seth Hillbrand 7c0a7f9f7b Adds plot functionality to Eeschema line formats
Dotted, dashed and dash-dot lines are provided in
HPGL, PDF, PS and SVG plot outputs along with line
width and color formatting.

DXF format does not currently provide any dashed
line functionality

A bug in HPGL plotted is corrected.  Previous HPGL
dashed line commands were incorrect, plotting all
lines as solid.
2017-11-15 08:10:51 +01:00
Seth Hillbrand b576189a00 Eeschema: Adding line styling options
NEW: Adds support in eeschema for changing the default line style,
width and color on a case-by-case basis.

CHANGED: "Wire" lines now optionally include data on the line style,
width and color if they differ from the default.

Fixes: lp:594059
* https://bugs.launchpad.net/kicad/+bug/594059

Fixes: lp:1405026
* https://bugs.launchpad.net/kicad/+bug/1405026
2017-11-15 08:10:51 +01:00
jean-pierre charras f7c0562c8b Gerbview: refinements in D_Code display.
Remove duplicate code between legacy and Gal canvas to calculate D_Code id draw parameters.
2017-11-13 11:30:23 +01:00
jean-pierre charras e14a1656db Add comments. Gerbview: in legacy mode, do not display D_Code id text when it is too small to be readable. 2017-11-13 09:11:54 +01:00
jean-pierre charras 2337b83ba6 richio.h, class LINE_READER: prefix variable member names by "m_", like in other classes in Kicad. 2017-11-12 18:29:56 +01: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
Wayne Stambaugh 5181c0ac75 Minor symbol library table edit dialog fix.
A copy and paste error was causing to footprint library table file name
and path to be shown in the symbol library table edit dialog.  Factor
out code in PROJECT::FootprintLibTblName() to PROJECT::libTableName()
to handle both symbol and footprint library table names and create a
new PROJECT::SymbolLibTableName() method to fix the path and file name
in the symbol library table edit dialog.
2017-11-11 10:33:06 -05:00
jean-pierre charras 9723b0d844 Fix a few minor coverity warnings (not initialized members) 2017-11-11 07:25:00 +01:00
Wayne Stambaugh 36f6d4a1f4 Convert symbol library editor over to use symbol library table.
Simplify some of the library editing code.  There have been a few minor
changes in the behavior of the editor.  If the current symbol is deleted
from the library, the next symbol in the library is not loaded.  The
deleted symbol is cleared and the current symbol is empty.

Change component to symbol to align with the preferred terminology
discussed on the developer's mailing list.

Add separate update UI event for save library as to enable the menu entry
whenever a library is selected.

Change the select symbol list dialog to a single column using the LIB_ID
format LIB_NICKNAME:LIB_ITEM_NAME so that the selection can be parsed by
LIB_ID.

Add method to expand URI to LIB_TABLE_BASE.

Override wxApp::OnExceptionInMainLoop() in debug builds to make debugging
easier when an unhandled exception occurs in a wxUpdateUIEvent handler.

Change SCH_SCREENS::HasNoFullyDefinedLibIds() to return false when the
schematic has no symbols to prevent the remapping dialog from being run.

Use SCH_COMPONENT part reference when creating netlist rather than looking
up the library symbol.
2017-11-09 18:50:20 -05:00
Wayne Stambaugh 0cf2df51c6 Convert symbol library viewer over to symbol library table.
Remove all instances of PART_LIBS and replace them with SYMBOL_LIB_TABLE
except for the CMP_TREE_MODEL_ADAPTER which requires updating as well.

Return the selected symbol using the LIB_NICKNAME:SYMBOL_NAME format when
viewer is launched as modal.

Add code to SYMBOL_LIB_TABLE object to allow enumerating symbol library
power symbols only.

Add a non-const version of LIB_TABLE::findRow().

Remove redundant information from Doxygen comments.
2017-11-09 18:50:17 -05:00
Wayne Stambaugh 96c3d5ff21 Enable symbol library table remapping.
Check the if the schematic being loaded has been remapped (no symbol
library table nicknames defined) and remap accordingly.

Fix issues when resolving the library symbol links in the schematic
symbols.

Add cache library fallback when resolving symbols that cannot be
remapped.

Add remap complete message to remap dialog.

Add HasLibrary() helper to LIB_TABLE_BASE.

Fix issues when loading library symbols using symbol library table.

Add hashing function to symbol library table.

Improve the symbol panel message to warn user when cache library is
used to resolve symbol.
2017-11-09 18:50:17 -05:00
Marvin Schmidt 5e013e916b Use std::remove_pointer instead of own implementation (NFC) 2017-11-09 19:52:18 +01:00
Marvin Schmidt 69974b73db Remove some extra semicolons 2017-11-09 19:52:18 +01:00
Marvin Schmidt 20f3cdaaea Remove orphaned code files 2017-11-09 19:52:18 +01:00
jean-pierre charras e985fc18e0 Fix a corner case in richio.cpp that creates a memory allocation overrun (allocate more space).
Also allows more space in memory allocation to read strings.

Could fix this bug:
Fixes: lp:1730861
https://bugs.launchpad.net/kicad/+bug/1730861
2017-11-08 13:11:51 +01:00
Maciej Suminski 40129d2244 Fixed cursor freeze after canceling a tool with cursor over a drag point
Fixes: lp:1716702
* https://bugs.launchpad.net/kicad/+bug/1716702
2017-11-08 11:41:45 +01:00
Marvin Schmidt ad9916e2cc box2: Remove wrong use of typename keyword 2017-11-05 23:03:52 +01:00
Marvin Schmidt a6ca44d9f0 vector2d: Fix traits usage and use std::numeric_limits 2017-11-05 23:03:52 +01:00
Marvin Schmidt fc08c58059 vector2d: Remove duplicate #include 2017-11-05 23:03:52 +01:00
Tomasz Włostowski 9932ff32ae refactoring: wrapped boost::optional in OPT<> class for the purpose of easier transition to C++17 in the future 2017-11-03 23:59:02 +01:00
Tomasz Włostowski b945d2a708 cleanup: replace CLASS_MIRE with CLASS_PCB_TARGET for naming clarity 2017-11-03 20:02:06 +01:00
Tomasz Włostowski 0245912c34 refactoring: split BOARD_ITEM::SwapData to use polymorphic per-item methods 2017-11-03 20:02:06 +01:00
Tomasz Włostowski 8a09a1d329 refactoring: derive PCB-specific PCB_VIEW from VIEW with the intention of moving PCB_EDIT_FRAME entries used by the tools (e.g. GetActiveLayer) there 2017-11-03 20:02:06 +01:00
Tomasz Włostowski 81d1e17f02 refactoring: renamed pcbstruct.h to pcb_display_options.h, DISPLAY_OPTIONS->PCB_DISPLAY_OPTIONS 2017-11-03 20:02:06 +01:00
Tomasz Włostowski 90ab5860dc refactoring: removed dependency of libpcbcommon on 3d-viewer. 2017-11-03 20:01:42 +01:00
Maciej Suminski 5eb56dd8b0 Coverity fixes
CIDs:
102571
168696
168701
168704
168706
168708
168710
168713
168716
168717
2017-11-01 10:24:26 +01:00
Maciej Suminski 3a8b4a2fb7 Fixed a memleak in GerbView
Changed m_painter PAINTER* to unique_ptr<PAINTER> to avoid confusion
regarding the objection destruction.
2017-10-30 09:36:34 +01:00
jean-pierre charras fc5e8e5f52 ENV_VAR config dialog enhancements.
From an initial work of Oliver <oliver.henry.walters@gmail.com>
2017-10-26 11:47:57 +02:00
jean-pierre charras 78ec983632 DRAWSEGMENT fix crash when trying to copy a empty polygon.
SHAPE_POLY_SET: fix crash in VertexCount when it is a empty poly set, or when params are incorrect.

minor other fixes:
warning in degug mode in dialog_dxf_import_base.cpp
pcb_painter.cpp: remove a useless debug line.
2017-10-25 09:39:26 +02:00
Maciej Suminski 944c5481fe Hash functions for BOARD_ITEMs 2017-10-24 23:10:40 +02:00
jean-pierre charras eb2340bc23 Show/Hide icons in menus (according to Icons option) in GAL, like in Legacy mode.
Cosmetic enhancement in Gerbview context menu.
2017-10-23 18:48:03 +02:00
jean-pierre charras 2d6496c7f6 Replace UNIT by EAGLE_UNIT in Eagle plugin to avoid having a lot of useless hits when grep for "UNIT" 2017-10-23 15:37:24 +02:00
jean-pierre charras 7418deb454 Pcbnew: fix issues with 360 deg angle arcs.
Fixes: lp:1725943
https://bugs.launchpad.net/kicad/+bug/1725943
2017-10-23 15:35:03 +02:00
jean-pierre charras 55bb35a582 Cosmetic enhancement: add icon to 2 context menus (explode pad to graphic shapes and create pad from graphic shapes) 2017-10-20 18:25:44 +02:00
Maciej Suminski 7d7303215b Eagle PCB import plugin: more descriptive warning messages 2017-10-20 09:34:33 +02:00
Maciej Suminski ee8012a5cc Eagle import plugin: Code clean-up and formatting 2017-10-20 09:34:33 +02:00
Maciej Suminski 25b8111341 Modified Eagle import plugins to use nanometers as the internal unit 2017-10-20 09:34:33 +02:00
Maciej Suminski ce11e9a264 Eeschema Eagle Import: Changed convertTextSize() to ETEXT::ConvertSize() 2017-10-20 09:34:32 +02:00
Russell Oliver 2a0a999350 Eeschema Eagle Import: Code clean-up and formatting 2017-10-20 09:34:32 +02:00
Maciej Suminski 985aed36c7 Moved FMT_UI & FMT_ANGLE macros to a separate header 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 230e8978f5 Eagle Parser: Fix overwritten changes 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 3145829b77 Fix compiler redefined warnings for FMT_IU 2017-10-20 08:58:40 +02:00
Russell Oliver a8fa64f158 Eeschema Eagle Import: Shift convertTextSize to common eagle parser. 2017-10-20 08:38:42 +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 08907d4fe8 Eeschema Eagle Import: generate unique timestamps for multiunit parts 2017-10-20 08:38:42 +02:00
Russell Oliver 956ef0fa61 Eeschema Eagle Import: WIP trying to fix indirect memory leaks 2017-10-20 08:38:39 +02:00