Commit Graph

3744 Commits

Author SHA1 Message Date
Jeff Young 1a007c3e4b Implement SCH_SELECTION_TOOL (but still with legacy semantics). 2019-04-22 22:08:18 +01:00
Jeff Young a461eae8b9 Fix 100s of usages of GetFlags() which conflated != 0 with being edited.
While this was true long ago, many flags have been added since which
have nothing to do with editing (HIGHLIGHTED, BEGIN_ONPAD, etc.)
2019-04-22 09:58:06 +01:00
Jeff Young 954998ec9a Lay the foundation for handling selected SCH_ITEMs. 2019-04-19 16:54:29 +01:00
Jeff Young 2bcf38d2b6 Add try/catch block around writing a new library.
Fixes: lp:1825203
* https://bugs.launchpad.net/kicad/+bug/1825203
2019-04-18 22:00:32 +01:00
Jeff Young 0772b54845 Move eeschema zoom-selection to modern toolset.
Fixes: lp:1825164
* https://bugs.launchpad.net/kicad/+bug/1825164
2019-04-17 21:49:50 +01:00
Jeff Young c88fd514a0 Implement drawing tools in modern toolset.
Fixes: lp:1825192
* https://bugs.launchpad.net/kicad/+bug/1825192
2019-04-17 21:49:50 +01:00
Seth Hillbrand 2a00fc962b Fix error in contour check
Correct mistake in bool() that prevented checking correct contour for
end of vertex list.
2019-04-16 20:21:04 -07:00
Seth Hillbrand 8cc3c6f159 Prevent iteration over empty polygon
When utilizing the standard iterator container, we may have polygons
with an empty outline (these are generated by gerbview to pcbnew).  This
should register as the end of the iterator to prevent dereferencing
2019-04-16 17:26:58 -07:00
Jeff Young 460909ea9a Move click-to-place tools to modern toolset. 2019-04-16 16:20:52 +01:00
jean-pierre charras ad5a1fd963 SIM_PLOT_FRAME: cosmetic enhancement: add icons in main menu.
Fix also Upeer/lower case issues in main menu strings.
2019-04-14 15:31:46 +02:00
Jeff Young 91bf08df1a Move ZoomFitScreen from GetBoundingBox to GetDocumentExtents. 2019-04-14 01:44:47 +01:00
Jeff Young 94a948fdd1 Move grid selection for both Eeschema and Pcbnew to COMMON_TOOLS. 2019-04-13 18:43:35 +01:00
Jeff Young fc7f5630c7 Move eeschema zoom operations to modern toolset. 2019-04-13 18:43:26 +01:00
Jon Evans dec5d80180 Veto mouse warping from DRC dialog
Fixes: lp:1824630
* https://bugs.launchpad.net/kicad/+bug/1824630
2019-04-13 11:23:57 -04:00
Seth Hillbrand 822cd9c6ef eeschema: Remove UR_WIRE_IMAGE
The wire image undo/redo option required special handling and was only
used in a single location.  Replacing with single change handling
reduces the code complexity
2019-04-13 07:11:24 -07:00
Jeff Young dae41b7460 Remove legacy segment-based zones.
Give the user the option of cancelling a file open if there are
segment zones; otherwise they're converted to polygon fills.

Fixes: lp:1823087
* https://bugs.launchpad.net/kicad/+bug/1823087
2019-04-12 20:19:23 +01:00
Seth Hillbrand d70ae19cb8 eeschema: Move realtime connectivity to adv config
This allows realtime connectivity testing by modifying the
kicad_advanced setting rather than recompiling
2019-04-12 08:37:44 -07:00
John Beard ab2281d26f GAL opts: move config reading into GAL_DISPLAY_OPTIONS
Move repeated GAL config reading routines into GAL_DISPLAY_OPTIONS.
THe app-level config is in here already, do the same for the
common config.

This means that the configs are loaded consistently, which fixes
the symbol-chooser preview window, which previously didn't use the
same config routine as other GAL canvases.

Future work could move these functions to free functions that
act on the public interface of GAL_DISPLAY_OPTIONS to avoid
GAL_DISPLAY_OPTIONS having to know about wxConfig and wxWindow.

Fixes: lp:1824524
* https://bugs.launchpad.net/kicad/+bug/1824524
2019-04-12 16:08:11 +01:00
jean-pierre charras c162ff9076 Curved airwires: set the default to straight lines (i.e. the legacy behavior)
Add also missing comments.
2019-04-12 14:17:55 +02:00
MaPePeR e7d32c54b9 pcbnew: Draw Ratsnest with arcs to avoid overlap
Adds a toggle button that allows switching between straight lines and
curves for the ratsnest lines.

Fixes: lp:1766597
* https://bugs.launchpad.net/kicad/+bug/1766597
2019-04-12 00:28:58 +01:00
Jeff Young 3c11b89e4c Hook up refresh buttons to library tree synchronisation.
Fixes: lp:1820057
* https://bugs.launchpad.net/kicad/+bug/1820057
2019-04-11 19:45:10 +01:00
Seth Hillbrand 8c9244e677 Revert "eeschema: Connectivity threading"
This reverts commit 1a031e771f.

Some nets broken in commit.
2019-04-10 20:08:42 -07:00
Seth Hillbrand 1a031e771f eeschema: Connectivity threading
This threads the first step (update item) in the connectivity routine.
Also eliminates the duplicate call for multiple copies of the same
sheet.
2019-04-10 15:04:22 -07:00
Jeff Young b7c12b238f Increase GervView layers to 51.
This also makes its use of LSET consistent with PCBNew.

Fixes: lp:1809019
* https://bugs.launchpad.net/kicad/+bug/1809019
2019-04-10 21:21:00 +01:00
Seth Hillbrand 257d9b5fe9 Allow setting the kicad config dir
This allows setting the config dir at build time, providing packagers a
method of controlling where the configuration files are placed.

Fixes: lp:1780601
* https://bugs.launchpad.net/kicad/+bug/1780601
2019-04-08 12:33:49 -07:00
Jeff Young adf3637476 Allow dialogs to veto mouse-warping when called from context menu.
Fixes: lp:1745731
* https://bugs.launchpad.net/kicad/+bug/1745731
2019-04-08 20:07:40 +01:00
Jeff Young a1c162e59f Reimplement footprint checking on top of DRC architecture.
This allows Import Netlist and Update PCB from Schematic to
share the same checking code, and expose it through the DRC
dialog.

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

Fixes: lp:1809293
* https://bugs.launchpad.net/kicad/+bug/1809293
2019-04-08 13:26:17 +01:00
Jeff Young 77f15eeeaf Support synchronous messaging over KIWAY EXPRESS.
This allows us to make the various netlist and pcb update routines
more atomic and less reliant on carefully sequenced asynchronous
messages.

This is also a prelude to adding support for footprint testing
without a netlist.
2019-04-08 13:26:09 +01:00
Seth Hillbrand 24bf838392 pcbnew: Allow arc editing via midpoint
This permits changing the radius of the arc by adjusting the center
point of the arc.  The arc end points are fixed in this operation.
2019-04-07 06:50:25 -07:00
Jeff Young 684bb62fd8 Escape slashes in labels and netnames.
Also re-allows spaces, as they can already come in through sheet
names.

Fixes: lp:1798621
* https://bugs.launchpad.net/kicad/+bug/1798621
2019-04-07 00:24:10 +01:00
Jeff Young 1ae47b6069 Implement a copper-to-edge-clearance setting.
For legacy boards, the setting is picked up from the board outline
thickness.  If the board outline has mixed thicknesses, then the
max is used and a warning is displayed.

Fixes: lp:1797787
* https://bugs.launchpad.net/kicad/+bug/1797787
2019-04-05 22:18:44 +01:00
Jeff Young 2aad4a5e57 Remove dead code from removal of eeschema legacy canvas. 2019-04-05 15:54:31 +01:00
Jeff Young 5ac96c6127 More mutex locking for SCH_FIELDs.
Fixes: lp:1822678
* https://bugs.launchpad.net/kicad/+bug/1822678
2019-04-03 17:04:59 +01:00
Jeff Young 3ace73fbdd Fold various SCH pin shadow data structures into SCH_PIN. 2019-04-03 10:18:11 +01:00
John Beard 6f1c3f5ef8 Eeschema: construct simulator cursors on demand
Statically constructing wxCursors as used for the probe
and tune cursors crashes the qa_eagle_plugin test
instantly.

Fix this by introducing a new class CURSOR_STORE,
which allows to abstract the platform wierdness of wxCursors
and allow the simulator to laziliy init its own cursors
at runtime.

This code isn't properly tested, as these cursors are never
actually used. However, it does allow the eeschema unit test
to run.

Fixes: lp:1781191
* https://bugs.launchpad.net/kicad/+bug/1781191
2019-04-02 18:26:33 +01:00
Michael Kavanagh b0674b8802 Add Ctrl+, hotkey to preferences dialog
Also change interactive router settings from Ctrl+, to Ctrl+Shift+,
2019-04-02 12:57:27 -04:00
Jeff Young ee3bac5a32 Remove angle brackets from indeterminate string.
They don't really help any, and they confuse some users into
thinking they need angle brackets around real values.

Fixes: lp:1821601
* https://bugs.launchpad.net/kicad/+bug/1821601
2019-04-01 13:23:37 +01:00
Jeff Young 3da5396c8d Fixes for importing board setup properties.
Save/restore default netclass.
Read layers back in with correct syntax ('.' between keyword and layer name).
Write layers to project file.
Read/write layer enablement bits.
Don't set solder paste margin min to 0 (most of them are negative).

Fixes: lp:1811990
* https://bugs.launchpad.net/kicad/+bug/1811990
2019-04-01 13:23:37 +01:00
Jon Evans 83c7e7fc65 New connectivity algorithm and bus upgrades
Bus upgrades: core new connectivity code

Bus upgrades: eeschema integration and modifications

Bus upgrades: eeschema dialogs

Bus upgrades: netlist export

Bus upgrades: file format changes
2019-03-31 19:53:41 -04:00
jean-pierre charras 175a2bc0b4 Force time stamp to 32 bits unsigned values, and make it tolerant to files using 64 bits values.
define timestamp_t as uint32_t.

Fixes: lp:1821476
https://bugs.launchpad.net/kicad/+bug/1821476
2019-03-26 14:28:14 +01:00
John Beard 567bdd9b9d Add configuration of Hi-DPI canvas scaling in OpenGL
First, add automatic detection of toolkit DPI scaling options. For now, this
is, in order,

* Check the GDK_SCALE option under GTK+ (users can set this to force the scaling)
* Check the value from WX's GetContentScalingFactor(). This will start to work
  correctly from WX 3.1 and GTK+ 3.10.

Then, add a user-settable override in the main prefs panel, next to the icon
scaling. This is independent of the icon scaling options.

DPI handling is performed in a standalone class, so they can be shared between
the prefs UI and the OpenGL backend easily. Also means Cairo could use the same
interface in future.

Also adjust the OpenGL grid drawing code to use the computed scale factor,
which avoids over-thick grids in scaled environments (the user can manually
thicken the grid if wanted).

Fixes: lp:1797308
* https://bugs.launchpad.net/kicad/+bug/1797308
2019-03-25 15:00:55 +00:00
jean-pierre charras ecb168f7a7 Add MD5_HASH::Format for debug purposes. 2019-03-21 11:42:15 +01:00
Seth Hillbrand 078320e2fb Unify and correct Autosave functions
Autosave was not working correctly, partly due to different
implementations in eeschema and pcbnew and partly due to a mistaken
refactor at some point during v5 development.  This unifies the expected
autosave prefix to _autosave- for both pcbnew and eeschema.  It also
unifies the expected suffix for the backup files to -bak.

Fixes: lp:1820433
* https://bugs.launchpad.net/kicad/+bug/1820433
2019-03-18 10:25:26 -07:00
jean-pierre charras a1ee5405aa Fix missing definition of std::hash<wxPoint> when using wxWidgets 3.1.x
it was not compiled for wxWidgets 3.1.x, but it does not exist in 3.1.x
2019-03-14 17:33:25 +01:00
jean-pierre charras 3fc681c1b7 PROF_COUNTER: add a helper method. 2019-03-14 09:11:34 +01:00
jean-pierre charras d259459a14 Pcbnew: add a new primitive pad shape: chamfered round rect pad.
Allows 0 to 4 chamfered corners, not only one.

A custom shape allow this kind of shape. However because it is a primitive,
it is easier to edit and it support thermal reliefs.
2019-03-11 10:26:15 +01:00
Seth Hillbrand 9bfce26ce7 Move env var substitution into GetAssociatedDocument
We always want the documents to have their variables replaced when
opening the associated file.

Fixes: lp:1819309
* https://bugs.launchpad.net/kicad/+bug/1819309
2019-03-10 08:39:36 -07:00
John Beard b6916c490c Pcbnew: allow tab traversal of footprint orientation text control
Disable the text update event for the orientation cutom value field before
updating it when the radio buttons are selected. This allows to use the
conventional EVT_TEXT handler, rather than KEYDOWN, which has two effects:

* Tabbing though the dialog no longer sets custom orientation
* Click-driven clipboard actions trigger the update correctly.

Introduce a helper function in validators.h to assist in updating
validated fields without triggering further events.

Fixes: lp:1819006
* https://bugs.launchpad.net/kicad/+bug/1819006
2019-03-07 20:27:04 +00:00
Jeff Young 69f003ba4a Remove previous cell selection fixes in favour of slow-click hack.
wxWidgets has several bugs that result in cell editors being closed
right after they're opened.  There are two wxWidgets hacks to
partially address this: the SetInSetFocus() hack, and a slow-click
hack.  We used to try and work-around these bugs ourselves for
single-click access, but this changelist moves those over to
wxWidget's slow-click hack.

Fixes: lp:1817965
* https://bugs.launchpad.net/kicad/+bug/1817965
2019-03-04 11:09:33 +00:00
Seth Hillbrand 38be0fccb7 Symlib table: Need button handler for files
The folder button handler works will for footprint libraries but we
needed a specific class for the schematic libraries as well.

Fixes: lp:1818346
* https://bugs.launchpad.net/kicad/+bug/1818346
2019-03-02 20:05:28 -08:00
Wayne Stambaugh 8d26b07f67 Fix potential string iterator issue.
Added checks to StrCmpNum() function in common/sting.cpp to prevent
iterating past the end of the sting.  Also removed length of string
parameter since it did not seem to be used anywhere.

Fixes lp:1818157

https://bugs.launchpad.net/kicad/+bug/1818157
2019-03-02 08:20:53 -05:00
Jean-Samuel Reynaud c77031842e Fix another compilation issue on PPC64 2019-02-27 11:23:23 -05:00
Seth Hillbrand 269f420f8d OpenGL: Create shaders for each GL
Fixes: lp:1817284
* https://bugs.launchpad.net/kicad/+bug/1817284
2019-02-25 09:31:42 -08:00
John Beard 82734e7116 Adjust tab ordering in some dialogs
Introduce a shortcut method to set tab ordering and use it in
the dialogs that override the tab traversal orders:

* Eeschema sheet properties
* Pcbnew Move exact
* Pcbnew Move relative

Also set some initial focus fields in the same dialogs.

Tidy a few includes.

Fixes: lp:1816009
* https://bugs.launchpad.net/kicad/+bug/1816009
2019-02-23 14:49:38 +00:00
Seth Hillbrand dae7b03465 gal: re-enable arc outline mode
Fixes: lp:1816373
* https://bugs.launchpad.net/kicad/+bug/1816373
2019-02-21 10:52:54 -08:00
Seth Hillbrand 066b1782bb cairo: Fix grid display
Grid points were uneven in Cairo compared to OpenGL.  This standardizes
the functions for grid types and simplifies the code
2019-02-21 10:49:56 -08:00
Seth Hillbrand 484c1f63ba gtk3: Force GTK2-style input handling
GTK3 provides for additional input devices via xinput2.  These include
touchscreens and continuous scroll devices.  But wxWidgets does not have
specialized handlers for these events, so they double up for some
devices.  Until wxWidgets allows us to handle these events, we specify
that the input handler should be the old-style GDK_CORE.
2019-02-19 11:03:20 -08:00
Tomasz Włostowski 3b3c674c1a gal: opengl: use correct radius for graphical circles 2019-02-19 01:55:50 +01:00
Seth Hillbrand 5af8d2d0a8 cairo: Fix rotated oval pads
Fixes: lp:1816428
* https://bugs.launchpad.net/kicad/+bug/1816428
2019-02-18 09:44:28 -08:00
Jean-Samuel Reynaud 8c69c81393 Adding support for PPC32 and PPC64.
Modification proposed by Gianluca Renzi.
2019-02-18 05:35:52 -08:00
Jiaxun Yang 320f4b6cd9 Add MIPS N64 support for libcontext 2019-02-18 05:14:21 -08:00
Seth Hillbrand d15876595f Fix init order to quiet warnings 2019-02-16 12:53:45 -08:00
Tomasz Włostowski 85a7ab7795 gal: minor cleanup & formatting 2019-02-16 20:25:10 +01:00
Tomasz Włostowski bbee30671a gal: pixel alignment hacks, works for Retina display too now.
gal: pixel alignment for Cairo.
gal: pixel alignment for OpenGL

Cleanup of pixel alignment patches

gal/opengl: more pixel alignment patches:
- works on Retina displays now
- pixel alignment for circles
- correct 1-pixel strokes
- fixed unfinished 1-pixel line ends

GAL: Restore antialiasing options in Cairo
GAL: Fix arc drawing

Removes DrawArcSegment, which drew arcs whose edge was optionally
stroked (a feature that we did not use).  Fixes Cairo arc drawing issue
where arcs were not visible in pcbnew.

gal: further cleanup
gal: removed unused shader parameter
2019-02-16 20:03:13 +01:00
Seth Hillbrand 813578eba6 Fix a few coverity errors 2019-02-15 20:15:04 -08:00
Seth Hillbrand 99be68f0f2 Remove debugging printf
The extra wx/gal debug statements are called on initialization but are
not used.  Removing the printf prevents statements outputting that may
confuse end users
2019-02-15 18:14:58 -08:00
Seth Hillbrand 7b60c856e9 view_rtree: Map maximum BBOX2I onto maximum rtree
When re-drawing or re-caching all items, we need to search the full
rtree, including for those items that live outside of the limits of
BBOX2I.  This forces the maximum BBOX2I to the full RTree limits
2019-02-15 09:12:51 -08:00
jean-pierre charras 869bdc2b3c Eeschema: regression fix: re-enable hold down control+shift to disable grid snapping when moving the mouse.
Fixes: lp:1815487
https://bugs.launchpad.net/kicad/+bug/1815487
2019-02-12 13:12:06 +01:00
Seth Hillbrand 7b3ef1b7ed colors: Add HSL conversion and tune colors
When adding colors to length tuner, we depend on the window background
color, which can be set by the user, resulting in an unreadable text.
This uses the HSL conversion to detect which shade it should use for the
coloring.

Also adds test cases for round-trip HSL and HSV conversion

Fixes: lp:1814530
* https://bugs.launchpad.net/kicad/+bug/1814530
2019-02-11 22:08:41 -08:00
John Beard 0c6ec7dbb3 LIB_TABLE_BASE: Const and unsigned fixes
* Make LIB_TABLE_BASE::GetCount() return unsigned. This is more
  consistent with the behaviour of STL containers (especially the
  boost::ptr_vector this is really accessing). Sadly
  wxGridTableBase() forces an int, so a cast is still required
  at the WX interface.
* Make LIB_TABLE_BASE::At() return a reference. First, this is more
  consistent with normal STL indexing operator[]'s, and secondly, it
  allows an idiomatic const index method (so you can access const
  LIB_TABLE_ROWs from a const LIB_TABLE_BASE).

The motivation is to allow use of this class and LIB_TABLE_ROW
in a test program, where the LIB_TABLE_BASE is const.
2019-02-05 08:49:52 -08:00
John Beard 84d79ec10d QA: LIB_TABLE tests
Some basic tests on LIB_TABLE and LIB_TABLE_ROW that demonstrate
the behaviour of fallbacks and various access methods.

Also add a few LIB_TABLE_BASE comments and changed some NULLs to
nullptr.
2019-02-04 19:44:54 -08:00
John Beard e6a6266f3d Build: libpolygon provides its own includes
Libpolygon can provide its own includes via target_include_dirs PUBLIC.
This means any linking targets do not need to specifiy them manually.

As common requires polygon, the polygon dep is also now no longer
required downstream of libcommon, as it's transisitvely implied
by libcommon's target_link_libraries.

This resolves a circular dependency previously detected and also
simplifies CMakeLists.
2019-02-04 19:29:31 -08:00
John Beard bb2ae8e13b Bitmaps: move bitmap defs to bitmaps library
The bitmap definitions (BITMAP_DEF and so on) do not
have any dependencies on other libs, including WX. This
means the bitmaps library can be isolated from the other
dependencies.

Common now depends on bitmaps, and libraries that depend
on common can pick it up from the common target_link_libraries,
as it is PUBLIC. This means a lot of targets no longer
need manual bitmap linkage.

This avoids a circular dependency that was previously reported
by static analysis.

Avoiding pulling in WX and other headers into the include
tree of each bitmap .cpp is a huge speed up (around 10x) in
compilation, and the generated static library is also 10x
smaller (20MB vs 200MB)

Add common as a link library to pnsrouter,connectivity.
THese library do still use common code (including bitmaps,
via base_screen.h) and this allows them to pick up the libcommon
includes correctly.
2019-02-04 19:29:31 -08:00
Seth Hillbrand d7272b7f5e eagle: Handle DRC rule-based pad shapes
Circles and Squares are handled correctly.  Octagons are converted to
circles.  Pad 1 is identified by the "1" string in the Eagle name.

Fixes: lp:1784126
* https://bugs.launchpad.net/kicad/+bug/1784126
2019-02-04 07:06:49 +01:00
Tomasz Włostowski 313ebb9dff router: correct walkaround corner case when both ends of the line lie on the hull edge
Fixes: lp:1810935
* https://bugs.launchpad.net/kicad/+bug/1810935
2019-02-03 11:22:18 +01:00
Jeff Young ba7b970817 Add pre-select architecture to grid helper icon-text-buttons.
Fixes: lp:1813973
* https://bugs.launchpad.net/kicad/+bug/1813973
2019-01-31 01:09:03 +00:00
Seth Hillbrand b14bc1bead svg: Use grouping
Uses existing grouping in SVG output.  Sets schematic components as a
grouped element in SVG as well as pcbnew elements per layer.

Fixes: lp:1011754
* https://bugs.launchpad.net/kicad/+bug/1011754
2019-01-30 16:58:33 -08:00
Seth Hillbrand 37741048ce plot: Correct a couple SVG output errors
Plotting to closed lines for polygons in SVG.  Also correct the filled
polygon line width for non-copper zones.

Fixes: lp:1813964
* https://bugs.launchpad.net/kicad/+bug/1813964
2019-01-30 15:41:36 -08:00
John Beard 88f9f6f072 Break out ref-des-centric functions to own header
This breaks the following functions out to a general-purposed refdes utils
header:

* MODULE::GetReferencePrefix()
* kicad_string.h RefDesStringCompare()

This acheives:

* Slimming of MODULE interface
* Placement of refdes code in common rather than pcbnew
** Testing of this code in qa_common
* Tighter and smaller includes for code that only needed refdes functions

Note: there are failing tests commited (as expected failures). These
are the cause of lp:1813669 and will be fixed as a follow-up commit.
2019-01-30 15:41:36 -08:00
John Beard dc20521cb9 Break out getTrailingInt from MODULE
This is not logic specific to MODULE. Breaking it out to
kicad_string.h acheives:

* Slimming of the MODULE interface
* Enables reuse of the function
* Enables testing of the function

Also add a test under qa_common for this function.
2019-01-30 15:41:36 -08:00
John Beard f85f10930a Break widget save/restore out to reusable class
The CONFIG_SAVE_RESTORE_WINDOW class does not need to be tied
to the array dialog, put it in common/widgets.

Also do a refactor and tidy-up of the the class, use a union for (slightly)
better type-safety and syntax (a variant would be better but that's C++17).

Also enable integral field save/restore from text boxes.
2019-01-30 15:41:35 -08:00
John Beard 5504981d00 Separate ARRAY_OPTIONS to own class in common
The geometry and numbering logic is separate to the dialog, and
can be separated for clearer logic and better testability.

Moreover, refactor it to avoid any dependency on pcbnew
classes, so it can be move to common for potential re-use in
eeschema and friends in future.

Also convert all wxPoint logic in these classes to VECTOR2I and
fix some function visibilities.

Add some unit tests of the ARRAY_OPTIONS geometry and numbering.
2019-01-30 15:41:35 -08:00
Jeff Young b3319d29c1 Init footprint chooser with current footprint.
Fixes: lp:1813882
* https://bugs.launchpad.net/kicad/+bug/1813882
2019-01-30 15:45:29 +00:00
John Beard 6880687f00 Geom: interate ClipperLib::Path by reference
ClipperLib::Path is std::vector<IntPoint>. Iterating this with
"for( auto point : path)" could result in 'n' IntPoint copy-constructions.
It does seem GCC 8, at least, manages to optimise these constructions
out.

Replace with the "standard" for( const auto& point : path) idiom.
2019-01-30 11:55:11 +01:00
Seth Hillbrand 9d99fd188f Revert "Change top selection drop-down to combobox"
This reverts commit 7d06651a10.
2019-01-28 10:15:32 -08:00
Seth Hillbrand 9742062712 Revert "Fix missing Choice->Combobox change"
This reverts commit 0fa374cce5.
2019-01-28 10:15:25 -08:00
Seth Hillbrand 823dce1a50 modedit: Allow name input for new footprint library
When prompting for a new footprint library, we need to treat the input
as a file for creation rather than a directory for selection.
Otherwise, users cannot specify the name of their new footprint library
independently of the existing directory names.

Fixes: lp:1812135
* https://bugs.launchpad.net/kicad/+bug/1812135
2019-01-22 15:40:10 -08:00
John Beard 267e17d539 QA: Add a generic utility tool executable.
The intention here is to make it possible to wrap up many of the
KiCad utility tools into a single executable. This reduces link times
as well as the duplication of CMake files needed to build very
similar tools.

This particular tool should be suitable for any code in common,
code in pcbnew and other end-executables probalby will need an
analagous version linked to the relevant kiface.

The first tool is the coroutine_example.cpp test case, which
can be useful when learning, debugging or porting the coroutine
infrastructure.
2019-01-22 09:04:38 -05:00
Baranovskiy Konstantin 65f5bd6a01 Dialog: Esc key closes a grid editor first.
CHANGED: By default dialog closes on Esc key immediately and if dialog
has a grid control there is no way to close a cell editor with canceling
changes. New behavior is next: if dialog has a grid and the grid has an
active cell editor Esc key closes cell editor, otherwise Esc key closes
the dialog.
2019-01-19 14:55:15 -05:00
Seth Hillbrand 4a68ae4bae polygon: Fix missing steiner removal and fracture
When removing steiner points, there is the possibility that the test
point is also removed.  In this case, it is no longer a member of the
linked list and will break the output.

The test for re-fracturing a broken polygon can also result in multiple
polygons, rather than only 0 or 1.  Skipping the extra polygons will
result in a limited tesselation.

Fixes: lp:1812393
* https://bugs.launchpad.net/kicad/+bug/1812393
2019-01-18 09:19:39 -08:00
jean-pierre charras e2afe5e1a3 Toolbars with wxComboboxes: Fix incorrect ReCreate Toolbar methods: they recreated these wxComboboxes without deleting the previously created.
This issue created memory leak and not working wxComboboxes (for instance after modifying the language selection).
Now, these wxComboboxes are created only once, never recreated.

Also: minor cosmetic enhancement in footprint editor main toolbar
(the save footprint icon is modified if the footprint is saved to the board or to the library)
2019-01-18 17:24:40 +01:00
jean-pierre charras 6bea0951a3 SHAPE_ARC: fix uninitialized member in a CTOR that created issues in a QA test.
Initializing all members is always good.
2019-01-17 16:35:54 +01:00
Seth Hillbrand 0f1a11ef38 pcbnew: Cut only copied objects
Fixes a bug where objects where accessed after being freed by the cut

Fixes: lp:1811456
* https://bugs.launchpad.net/kicad/+bug/1811456
2019-01-11 17:27:29 -08:00
jean-pierre charras 644855c5ba Fix incorrect (broken) canvas type saving in config.
The config was saving a canvas type EDA_DRAW_FRAME member not always accurately initialized.
And the last canvas opened frame setup was saved, not necessary a frame having a canvas type that can be set by user.
This is a broken feature especially because the footprint viewer has a fixed canvas setting.
2019-01-11 13:19:46 +01:00
Seth Hillbrand fe30460aeb gal: Save canvas type unconditionally
The canvas type might change without the frame being notified.  If this
happens, the user is presented with repeated notifications of OpenGL
issues.  Howver, switching canvas is not an error and should be
presented to the user as an info message to clarify that the system is
still working but it has changed how it renders the screen.

Fixes: lp:1795240
* https://bugs.launchpad.net/kicad/+bug/1795240
2019-01-09 10:36:01 -08:00
John Beard 658cc8fd96 Wildcards: unify handling of all files wildcards
Use the AddFileExtListToFilter() to also generate the
wildcard for "all files". This is because:

* Users can use AddFileExtListToFilter for the all files WC
  with the same interface as for any other extensions.
* Users do not need to worry about wxGetTranslation, as the
  _() is applied in the same way as the other *Wildcard() helpers,
  and it is a function just like the others, so it is consistent
* There is a testable interface to document the expected result.
  The test is added.
2019-01-09 08:57:42 -05:00
John Beard dd313d4d47 Wildcards: use vectors instead of varargs + tests
Varargs make it very hard to pass strings in flexibly
when they (and the number of them) are not known
at compile time.

For example, this allows up to now amalgamate the "single
ext" and "multiple ext" unit tests.
2019-01-09 08:57:35 -05:00
Fabián Inostroza 7f6b35c6bc Don't start autopan if the cursor was warped
The application warps the cursor when initiating some actions (dragging,
selecting modules or Find and Move).  This warping should not also
trigger the autopan action.

Fixes: lp:1810787
* https://bugs.launchpad.net/kicad/+bug/1810787
2019-01-08 12:15:33 -08:00
Seth Hillbrand 90ad240660 units: Move common units and add tests
Centralizing duplicate code from Eeschema and pcbnew and adding unit
tests
2019-01-08 09:29:32 -08:00
Seth Hillbrand 8f11a2133e Revert "QA: Add a generic utility tool executable."
This reverts commit 502306314e.
2019-01-06 16:17:44 -08:00
Seth Hillbrand 1e5ba6f1b1 Replace DIM() macro
The standard DIM() macro was not typesafe as it happily deferred errors
to runtime that can be caught at compile time.  Replacing it with a
generic C++11 constexpr allows for typecasting, comparison and compile
time error checking.
2019-01-06 08:43:12 -08:00
John Beard 502306314e QA: Add a generic utility tool executable.
The intention here is to make it possible to wrap up many of the
KiCad utility tools into a single executable. This reduces link times
as well as the duplication of CMake files needed to build very
similar tools.

This particular tool should be suitable for any code in common,
code in pcbnew and other end-executables probalby will need an
analagous version linked to the relevant kiface.

The first tool is the coroutine_example.cpp test case, which
can be useful when learning, debugging or porting the coroutine
infrastructure.
2019-01-06 07:51:23 -08:00
Seth Hillbrand e8333633fe GAL: Add antialiasing options to Cairo
Cairo supports antialiasing when rendering but can be slow when set to
sub-pixel mode.  This bumps the minimum version of Cairo to 1.12
(available in 14.04 LTS as well as mingw) to support three antialias
settings (fast, good, best) that offer speed/appearance tradeoffs.

This can provide a higher-quality eeschema render as it works on a
per-element basis as opposed to the OpenGL per-screen antialias.
2019-01-04 13:39:56 -08:00
Seth Hillbrand 0fa374cce5 Fix missing Choice->Combobox change
Strangely this did not affect gcc and only showed an issue on Mac +
clang.
2019-01-04 10:25:52 -08:00
jean-pierre charras db7dba96ad Fix a few Coverity warnings.
Mainly not initialized members, and replace not tested dynamic_cast by static_cast.
2019-01-04 09:49:21 +01:00
Seth Hillbrand 7d06651a10 Change top selection drop-down to combobox
wxChoice centers the selection on GTK.  So when switching from a
mid-list item to an item at the top, the list is always cut off for
choice lists located on the top toolbar.  Using a combobox provides a
drop-down that allows easier access to all elements in the box.

Fixes: lp:1808569
* https://bugs.launchpad.net/kicad/+bug/1808569
2019-01-03 14:48:28 -08:00
jean-pierre charras 14ede151cc Add a helper function FileExtListToFilter() to build the wildcard filter used in File Dialog.
It avoid including these extensions in a translatable string, thus avoid breaking filter
if the translation is incorrect (It happens sometimes).
See wildcards_and_files_ext.cpp for use.
2019-01-01 15:38:57 +01:00
John Beard e856a7a09c Disable legacy canvas on GTK3
This make the use of legacy canvas on GTK3 a default-off
advanced config. Legacy is substantially broken on GTK3
and is of basically no use at all to general users on this
platform.

If the program starts with legacy canvas in the config,
it is forced into a GAL mode, as otherwise it could happen
that the user is stuck and unable to get into pcbnew to change
the setting.

Fixes: lp:1803156
* https://bugs.launchpad.net/kicad/+bug/1803156
2018-12-28 11:36:09 -05:00
John Beard 892f7cf8ff Make SVG import an advanced config, not a compile option.
This demos the advanced config and allows no-recompile switching
of the SVG importer. It also allows the import manager to be
tested more completely.
2018-12-28 11:36:09 -05:00
John Beard a33a8292a4 Run-time config for advanced options
This can be used for "advanced" options which are for developers
to use for feature-flags and other configuration. Run time config
has some advantages over preprocessor defines:

* Can be changed without recompilation
   * Sensitive to XDG_CONFIG_DIR, so flipping configs is easy
* Better compiler coverage (less conditionally compiled code means
  less chance to break a different configuration). Also better
  analysis coverage.
* Type safe config params
* Centralised documentation: it's in doxygen, in one place

No advanced config should be required by a general users. If a general
user does use one of these configs, it's probably because:

* There is a bug and one of these configs is a workaround
* A config in here is generally useful and should be moved into the
  relevant application config and given UI.

For now, the config is read-only, and is read from the
"kicad_advanced" config file in the normal config dir.
2018-12-28 11:36:08 -05:00
Tomasz Włostowski bebbe6ed22 pcbnew: disable autopanning when cursor entered auto-pan margin following a keyboard cursor move command
Fixes: lp:1803523
* https://bugs.launchpad.net/kicad/+bug/1803523
2018-12-23 18:58:12 +01:00
jean-pierre charras dde933ba08 When printing, pads are not always printed (especially on tech layers)
A printing mode is added, to force ViewGetLOD() to return 0 in printing mode (pads are always drawn)

Fixes: lp:1809528
https://bugs.launchpad.net/kicad/+bug/1809528
2018-12-22 13:44:49 +01:00
Seth Hillbrand 55f2a79957 pcbnew: locking connectivity using RAII
Rather than depend on proper unlocking for each exit, we move the
connectivity lock mutex into an RAII-type configuration that
automatically unlocks on exit.
2018-12-20 11:04:08 -08:00
Maciej Suminski 24f9bfa13b Fixed memory leaks
This is commit a9efbf47 with a fix for SWIG to deal with unique_ptr.
2018-12-20 10:05:58 +01:00
jean-pierre charras 83d851956c classes MARKER rework: remove duplicate code. Better HitTest code (HitTest takes in account the actual shape) 2018-12-19 19:53:27 +01:00
jean-pierre charras 15843ae01a class MARKER rework: fix a few minor issues, remove duplicate code and add comments. 2018-12-19 15:13:31 +01:00
Seth Hillbrand 64f1fb9e79 tesselation: Re-check polygon count after fracturing
The fracture() call may result in zero polygons remaining, which will
cause failure in our tesselation routine, so we need to check whether
this is a valid POLYGON before re-tesselating.
2018-12-18 13:49:13 -08:00
Seth Hillbrand 2498da2745 Tesselation: Only set valid when successful
Tesselation can fail for a number of reasons.  When this happens, we set
the triangulationValid flag to false to prevent using the broken
triangulation.  This will fall back to the slow OpenGL triangulation
when DrawPolygon is called.
2018-12-18 09:16:16 -08:00
jean-pierre charras 388397f97d Protect TesselatePolygon() against degenerated polygons (less than 3 corners) to avoid crashes.
Use TesselatePolygon() to draw polygons in Gerbview instead of GLU tesselation, much slower.
Add helper methods in GAL to know if the current GAL engine is Cairo, OpenGL or something else,
useful to optimize drawing code.
2018-12-18 12:49:14 +01:00
Seth Hillbrand 7f5503a783 tesselation: Fix winding order bug
Typo created a couple issues with calculating winding order.
2018-12-17 17:13:13 -08:00
Seth Hillbrand 657bf2b53e tesselation: In case of failure, re-fracture
Simplification with clipper can produce a polygon with holes.  We need
to re-call simplify followed by fracture to ensure valid triangulation
2018-12-17 17:02:32 -08:00
Seth Hillbrand e49242bc54 tesselation: Check winding order
Although copper layers are always tesselated CCW, polygons in footprints
will be CW if flipped to the back layer, resulting in a bad render.
2018-12-17 12:45:28 -08:00
Seth Hillbrand 98d6d68e2d tesselate: Check for non-polygons
Elements with only 0, 1 or 2 vertices cannot form valid polygons, so do
not attempt to tesselate them.
2018-12-17 11:45:30 -08:00
Seth Hillbrand 9ef3997e1e status_popup: Allow VECTOR2I input
Convenience overload for VECTOR2I input to the popup placement.

Also adjust the default foreground color to use system coloring
2018-12-13 12:32:58 -08:00
Seth Hillbrand e307d9318b Revert "Fixed memory leaks"
This reverts commit a9efbf4716.

The commit broke compiles with scripting
2018-12-11 10:12:44 -08:00
Maciej Suminski 63d4afb3ee Support autopanning in GALified eeschema
Fixes: lp:1807234
* https://bugs.launchpad.net/kicad/+bug/1807234
2018-12-11 17:49:34 +01:00
Maciej Suminski a9efbf4716 Fixed memory leaks 2018-12-11 16:21:43 +01:00
jean-pierre charras 253b14b871 VIEW_OVERLAY: add missing code and missing poly graphic overloaded primitives.
Some graphic primitives were already in VIEW_OVERLAY, without code.
A few graphic overloaded primitives (Polygon and Polyline) where missing.
2018-12-11 11:42:39 +01:00
jean-pierre charras 85775d522c Fix incorrect include paths
Especially, pcbnew/import_dxf is no longer in use.
2018-12-11 11:32:58 +01:00
jean-pierre charras 4013f6424d Pcbnew, autoplacer: display more activity during footprint placement 2018-12-10 10:33:56 +01:00
jean-pierre charras f6aed7c99a Gerber plotter: rename UseX2Attributes() to UseX2format, and fix incorrect/outdated comments. 2018-12-09 10:23:07 +01:00
Wayne Stambaugh c7998cfc23 3D Viewer: fix screenshot file extension bug with GTK+
Append the appropriate file extension to the file name if the file name
does not have a file extension.  This is a know issue with the GTK+ file
dialog.

Make the last 3D viewer screenshot last file used code more coherent.

Add the 3D viewer main frame trace string to the trace environment
variables doxygen group.

Doxygen comment and other minor code cleaning.

Fixes lp:1804980

https://bugs.launchpad.net/bugs/1804980
2018-12-08 08:20:32 -05:00
Jeff Young 78daaa8825 Allow cancel, delete or rescue when opening pcbs with undefined layers.
Fixes: lp:1796596
* https://bugs.launchpad.net/kicad/+bug/1796596
2018-12-07 00:26:10 +00:00
Seth Hillbrand 1f62a2d784 gtk3: prevent double scroll events
GTK3 smooth scrolling is enabled by wxWidgets but not to the exclusion
of normal scroll up/down events.  wxWidgets maps these both to the same
scroll handler and will fire them both if they are not handled before
being queued.  Testing timestamps allows us to mark and ignore the
dupes.

This is set to GTK3 only for now as it isn't listed as a problem for
other platforms.  But it shouldn't cause issues if it is enabled
elsewhere in the future.
2018-12-06 13:46:52 -08:00
jean-pierre charras 2ec957a226 polygon_triangulation.h: fix a missing call to updateList() in TesselatePolygon. 2018-12-04 15:47:54 +01:00
Seth Hillbrand 26765161c1 drc: Add board outline and edge crossing
This adds a check for contiguous board outlines to the DRC.  It also
uses the calculated outline to ensure that traces are not crossing the
outlines.

Fixes: lp:1648055
* https://bugs.launchpad.net/kicad/+bug/1648055
2018-12-02 07:54:52 -08:00
Jeff Young ff6a3482ec Remove on-kill-focus-validation.
Fixes: lp:1805361
* https://bugs.launchpad.net/kicad/+bug/1805361
2018-11-29 19:00:21 +00:00
John Beard 369d172460 Document tracemask strings and add note in testing.md
Also make the examples in the testing.md docs self-consistent.
2018-11-27 08:33:10 -05:00
John Beard 1eb0f70de5 Zoom: Use std::chrono for the timestamping
The reduces a little bit of WX dependency, and makes
the timing code a bit more type-safe.

Also adds a more testable interface for the accelerated
zoom controller.
2018-11-26 14:40:23 -05:00
John Beard 5a0318968f Break zoom control into a self-contained controller
This is done to avoid a big chunk of conditionally-compiled code
in the middle of the event function.

Also separates the zoom logic from the WX_VIEW_CONTROLS object
and isolates it in a separate class behind a clearer interface.

Add some simple tests for sane steps on GTK+3-sized scroll
steps.
2018-11-26 14:40:09 -05:00
jean-pierre charras 0b890b4d1d Drill files generation: add 3 structured comments in NC (Excellon) drill files and remove duplicate code. 2018-11-24 08:51:58 +01:00
Seth Hillbrand 106eaaade6 HTML_REPORT: RPT_ALL as sum of individual options
This syncs the "All" checkbox with the state of the report options such
that selecting "All" automatically selects the other boxes and
deselecting a box results in the "All" box also being unselected.  This
allows a single click filtering of report messages.

Fixes: lp:1796992
* https://bugs.launchpad.net/kicad/+bug/1796992
2018-11-23 20:31:27 -08:00
Jeff Young 647fa6547d Update grid drop-down when changing user grid. 2018-11-23 23:33:02 +00:00
Maciej Suminski 056114a15d Fix an outburst of error messages in UNIT_BINDER
Fixes: lp:1804834
* https://bugs.launchpad.net/kicad/+bug/1804834
2018-11-23 16:00:24 +01:00
jean-pierre charras ab3ff61faa Eeschema: adjust the working/drawing area size on the page size.
This makes using Scrollbars more easy to use, especially for "small" page sizes like A or B.
Note also the working/drawing area size is bigger than the page size (3 times)
2018-11-20 15:11:22 +01:00
Jeff Young 0de9cb345c Add shortcuts to setting dialogs for track widths, via sizes and grid sizes.
Fixes: lp:1803671
* https://bugs.launchpad.net/kicad/+bug/1803671
2018-11-17 00:35:06 +00:00
Jeff Young 4050991d28 Move ERC marker focusing to GAL architecture.
Fixes: lp:1802537
* https://bugs.launchpad.net/kicad/+bug/1802537
2018-11-16 10:38:44 +00:00
Maciej Suminski 228ea64016 Fix printout page orientation on GTK3
Fixes: lp:1803540
* https://bugs.launchpad.net/kicad/+bug/1803540
2018-11-16 09:52:40 +01:00
Jeff Young bcc8c64256 Consider edge cuts items to have zero width when filling zones.
Fixes: lp:1797787
* https://bugs.launchpad.net/kicad/+bug/1797787
2018-11-14 23:45:32 +00:00
Wayne Stambaugh f1f4473d8b Footprint editor: add save view to PNG file.
Factor out save current canvas view to image file code from symbol editor
code so it can be used anywhere.

Add ability to save to any image format supported by wxBitmapType.  See
https://docs.wxwidgets.org/3.0/gdicmn_8h.html#a90a1eb6d85b5044a99b706fd979f27f5.
Currently only PNG output is implemented.

Please note that there is a minor bug that appears to be due to the
scroll bars which causes unfilled areas on the right and bottom edges
of the image.  This always existed in the save symbol editor view
image but it was not as noticeable because by default the background
color is white.  It is very noticeable in the footprint editor with
a black background.

The usual smattering of coding policy and comment fixes.

Fixes lp:1802127

https://bugs.launchpad.net/kicad/+bug/1802127
2018-11-09 08:32:36 -05:00
John Beard 4c355c32d3 Fix rounding in COLOR4D::ToColour
Due to the implicit floor of the cast from double to unsigned char,
there was a small rounding error in COLOUR4D's WX conversion function.

This fixes the failing tests.

Also make the cast to unsigned char explicit.
2018-11-08 14:40:42 -05:00
John Beard 5660ad86ea QA: Add TITLE_BLOCK tests
Add some unit tests on TITLE_BLOCK

This commit also requires some mocks so the libcommon stuff
can work:

* Needs a Kiface() function to be linkable
* Needs some stuff from common to be build specially
* Needs to define itself as one of the unit-having programs
  to appease the units defines.
2018-11-08 08:28:20 -05:00
jean-pierre charras 238abad004 Gerber job file: fix incorrect GUID.
Fixes: lp:1801696
https://bugs.launchpad.net/kicad/+bug/1801696
2018-11-06 08:16:07 +01:00
Jeff Young fec8ab372e Don't set the viewport when switching screens.
That's the job of ZoomAutomatique().

Fixes: lp:1799436
* https://bugs.launchpad.net/kicad/+bug/1799436
2018-11-04 19:17:53 +00:00
Jeff Young 589e1f6a96 MSW and GTK need a separate dialog for opening/saving directories.
Fixes: lp:1801528
* https://bugs.launchpad.net/kicad/+bug/1801528
2018-11-04 12:35:01 +00:00
Jeff Young 3bfd32cdc5 Inherit grid settings from PCBNew.
Fixes: lp:1801428
* https://bugs.launchpad.net/kicad/+bug/1801428
2018-11-04 12:35:01 +00:00
jean-pierre charras 5e44686711 Eeschema, symbol editor: re-enable PNG export and fix a minor issue in SVG export (was in B&W mode instead of color).
Add a comment in plotter.h to avoid other errors when selecting plotting mode B&W or color

Fixes: lp:1801058
https://bugs.launchpad.net/kicad/+bug/1801058
2018-11-02 09:24:55 +01:00
jean-pierre charras 601e0a31b5 Open project folder in host OS: refinements.
Remove 2 png files that should not be is trunk.
2018-11-01 15:11:29 +01:00
Maciej Suminski afda69c9cc Removed default line width setting from the printing dialog 2018-10-31 19:17:30 +01:00
Maciej Suminski cbf7d708b2 pcbnew: Draw title block normally even when the view is flipped 2018-10-31 19:17:30 +01:00
Maciej Suminski 64da77538f Fix bitmap scale in printouts
Display GALs had an incorrect world unit value set. Now the world unit
value says how many internal units are in an inch, in accord with the comments
in the GAL header. Bitmap drawing code relied on the information about DPI,
so scaling worked differently for display and print GALs.
2018-10-31 19:17:30 +01:00
Maciej Suminski d3ea63e133 Removed a redundant parameter from BOARD_PRINTOUT constructor 2018-10-31 19:17:30 +01:00
Maciej Suminski dea778842b Grand printing dialogs refactor
Patch introduces a generic printing settings window that is customized by pcbnew and gerbview.
2018-10-31 19:17:30 +01:00
Maciej Suminski e81c3a59a2 Refactored and unified board editor and footprint editor print dialogs 2018-10-31 19:17:30 +01:00
Maciej Suminski 562b8d7948 Printing code clean-up 2018-10-31 19:17:30 +01:00
Maciej Suminski 92c5cb288e Fixed scale in Gerbview printouts 2018-10-31 19:17:30 +01:00
Maciej Suminski 347e21daaa Handle printout settings: line width, color/mono, mirror 2018-10-31 19:17:30 +01:00
Maciej Suminski 47d0eaa2c6 GAL: changed line width setting to float type 2018-10-31 19:17:30 +01:00
Maciej Suminski 1cce194c8a Handle layer settings in printouts 2018-10-31 19:17:30 +01:00
Maciej Suminski 5b94f20e6f Adapted printout controllers to the new printing routines 2018-10-31 19:17:30 +01:00
Maciej Suminski 6c689305a6 Decouple GAL printing interface and its Cairo-based implementation 2018-10-31 19:17:30 +01:00
Maciej Suminski e36f6b476d Changed the CAIRO_GAL class hierarchy
There is a dedicated class for display (CAIRO_GAL) and another one
for printing. The common part has been moved to CAIRO_GAL_BASE.
2018-10-31 19:17:30 +01:00
Maciej Suminski 5a64343fb4 CAIRO_PRINT_CTX class
CAIRO_PRINT_CTX provides a Cairo context created from wxPrintDC.
It allows one to prepare printouts using the Cairo library and
let wxWidgets handle the rest.
2018-10-31 19:17:29 +01:00
Maciej Suminski f948e46330 VIEW: changed wxASSERTs to wxCHECKs 2018-10-31 19:17:29 +01:00
Maciej Suminski 17205b4599 Added VIEW::DataReference() for sharing data with another VIEW instance 2018-10-31 19:17:29 +01:00
Maciej Suminski 1411e1f73a GAL: added methods to modify rotation in the transformation matrix 2018-10-31 19:17:29 +01:00
Jeff Young de971df4c6 Don't put up error dialogs after a Cancel of a dialog.
Fixes: lp:1800711
* https://bugs.launchpad.net/kicad/+bug/1800711
2018-10-30 23:13:32 +00:00
Jeff Young 364be90dc5 Fix translation issues with copy/paste block.
Also fix issues with paste not working at all from the context
menu in LibEdit.

Fixes: lp:1800513
* https://bugs.launchpad.net/kicad/+bug/1800513
2018-10-30 11:33:49 +00:00
Jeff Young 16925cc74e Implement RAII locking for GAL updating.
Fixes a crash when typing fast in the place footprint filter box.

Also adds a bunch more checking to GAL locking, including making
sure the same person unlocks as locked, and preventing piece-meal
calls (the RAII objects must be used).
2018-10-26 23:02:05 +01:00
jean-pierre charras 256f1a26e6 Fix a compil issue with gcc 4.8.4 compiler
On Ubuntu 14.04 the compiler does not like using const iterators instead of iterators.
2018-10-25 20:24:33 +02:00
Seth Hillbrand 90233e5ec6 SELECTION: Prevent double select/deselect.
When processing the selection filter, items were deselected before being
reselected after passing through the filter.  This adjusts the logic to
only deselect those items that are filtered out.
2018-10-24 17:17:45 -07:00
Seth Hillbrand 1dd22f5035 SELECTION: Utilize sorted deque
Many operations on the selection involved getting an item by index or
dereference.  The std::set needed to iterate from the beginning of the
set to find the item in its red-black tree.  Using a deque that we keep
sorted, we get index access in O(1) and item search in O(lg N).
2018-10-24 16:32:34 -07:00
Jeff Young a96dbde738 Allow net-ties within footprints.
Fixes: lp:1799318
* https://bugs.launchpad.net/kicad/+bug/1799318
2018-10-23 20:54:42 +01:00
Maciej Suminski f1b2855e80 Fix ENV_VAR_NAME_VALIDATOR typing characters backwards
Fixes: lp:1798869
* https://bugs.launchpad.net/kicad/+bug/1798869
2018-10-22 15:07:44 +02:00
Jeff Young f17c18bcce Remove AdvanceDepth() hacks in favour of proper layers.
Also removes the bounding-box cache since the last big merge
should have sorted out the Update(GEOMETRY) calls.

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

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

Fixes: lp:1797075
* https://bugs.launchpad.net/kicad/+bug/1797075
2018-10-21 15:55:56 +01:00
Simon Richter abe1ffabda Replace WIN32 preprocessor symbol by the official symbol _WIN32, used almost everywhere 2018-10-20 09:22:24 +02:00
Wayne Stambaugh f584b30c73 Replace log debugging output with tracing.
Replace all instances of wxLogDebug with wxLogTrace in the common and
kicad folders to prevent unwanted debugging output.

Add new trace flags for locale and screen object tracing.

The usual smattering of code policy fixes.
2018-10-17 15:03:33 -04:00
jean-pierre charras 61f2dd21b1 Eeschema gal: fix some redraw issues for bitmap images and worksheet.
After edition, the worksheet was not updated on screen.
Bitmap images were not shown in opengl mode due to the fact all gal layers were cached.
2018-10-16 14:20:09 +02:00
Jeff Young 59b7762981 Back out workaround f1e2f142a6.
A proper fix is in bf164f7c4b.
2018-10-15 20:33:43 +01:00
Tomasz Włostowski d66e0d4f7a eeschema-gal: implemented EnableDepthTest() in GAL, fixed drawing order in eeschema 2018-10-15 00:09:59 +02:00
Jeff Young 0bd0558833 Auto-select reference numbers in PcbNew like we do in Eeschema. 2018-10-14 00:06:41 +01:00
Jeff Young f1e2f142a6 Work-around for preference crash with multiple GAL docs open. 2018-10-13 19:41:45 +01:00
Jeff Young 6a5744adb1 Show compile errors and go back to GLSL V120. 2018-10-13 12:39:53 +01:00
jean-pierre charras 1bce69b9f0 Fix a minor compil warning. 2018-10-13 08:24:31 +02:00
Jeff Young 6c34fdefd7 Better exception handling and context locking for GAL.
This prevents deadlocks when exceptions are thrown and the context
ends up not getting unlocked.

It also removes an earlier hack to try and minimize this which
didn't work anyway.
2018-10-12 23:44:49 +01:00
Tomasz Włostowski 711b278248 gal/opengl: handle single-pixel line width clamping in hardware (new shader). Correct grid rendering in GAL for pixel-sized lines 2018-10-12 19:13:54 +02:00
John Beard b64c6dbf35 Use wxCHECKs to protect non-position TOOL_EVENTS
Getting the position of a non-position TOOL_EVENT will
now result in a wxCHECK, and a null-position (0,0) will
be returned. The new interface HasPosition() can be used
to determine if a call to a position function is safe to
make from the caller.

Fixes the underlying danger behind lp:1796045, which has
already been neutralised by a4966adb6, which avoids calling
the Position() functions when the TOOL_EVENT is not known
to be a position.

Fixes: lp:1796045
* https://bugs.launchpad.net/kicad/+bug/1796045
2018-10-12 09:08:07 -07:00
Jeff Young 609d497870 Remember settings in Global Track & Via Properties dialog. 2018-10-10 19:49:06 +01:00
Tomasz Włostowski 576b918351 BOX2: added compare operators 2018-10-10 17:26:32 +02:00
Jeff Young 14721829d7 Hook up keyboard events to parent combobox of net selector. 2018-10-10 14:02:25 +01:00
Seth Hillbrand 13997f0050 Revert "pcbnew: Adding copy constructors to PNS items"
This reverts commit 41e4bc4d9f.

This commit requires additional testing before recommitting as it causes
issues with FindJoint().
2018-10-09 14:50:20 -07:00
Seth Hillbrand 41e4bc4d9f pcbnew: Adding copy constructors to PNS items
Adding safe copy constructors to PNS items including assignment check
and copy operations
2018-10-09 05:37:48 -07:00
Jeff Young 9dfcc839a4 Fix color issues with cursor and sheet pins. 2018-10-09 11:08:56 +01:00
jean-pierre charras a6d014d959 Fix some artifacts when drawing items, both on Cairo and Opengl.
Fix also incorrect selection of De Morgan style selection in SYMBOL_PREVIEW_WIDGET.
2018-10-09 11:08:56 +01:00
Jeff Young 2d5baac77d Fix up zoom and pan issues entering/leaving sheets. 2018-10-09 11:08:56 +01:00
jean-pierre charras 33386ec980 Fix zoom issues in Eeschema (F1 to F4 and popup zoom commands) Fix also not saving the Gal Canvas type on eeschema exit. 2018-10-09 11:08:56 +01:00
jean-pierre charras f283667fb0 add option to switch between opengl and cairo in eeschema (step 1) 2018-10-09 11:08:56 +01:00
Jeff Young d9d2822fe0 Fix cross-probing. 2018-10-09 11:08:56 +01:00
Jeff Young fee52e127f Add line style drawing. 2018-10-09 11:08:56 +01:00
Jeff Young 3c82ad3220 Finish up the block rotate/mirror fixes.
Block rotate and mirror now work like they do in Pcbnew (that is
they're treated as part of the block move/duplicate/whatever
rather than finishing it).

Fixes: lp:1780794
* https://bugs.launchpad.net/kicad/+bug/1780794
2018-10-09 11:08:55 +01:00
Jeff Young 7216eda202 Fix bugs in block operations.
1) when duplicating don’t keep original hidden until end of drag
2) reset selectionArea when showing it so it doesn’t flash in its previous location
3) center a pasted block on the cursor
4) don’t draw the source selectionArea when pasting a block
5) implement selection-style highlighting for contents of blocks
6) add pasted items to view so they don’t disappear when the block is placed

Fixes: lp:1747197
* https://bugs.launchpad.net/kicad/+bug/1747197
2018-10-09 11:08:55 +01:00
Jeff Young 38f38b16c0 Fix dissappearance of moved items. 2018-10-09 11:08:55 +01:00
Jeff Young 5fd20ee786 Implementation of ERC markers. 2018-10-09 11:08:55 +01:00
Jeff Young d7178c7833 Implement GAL refresh for a bunch of operations. 2018-10-09 11:08:55 +01:00
Jeff Young afeebc8944 Grid settings for Eeschema GAL.
Split antialiasing options out from display options.  Move
antialiasing to common.  Duplicate the rest of display options
for Eeschema.

Implement OnSelectGrid and hookup GAL canvas refresh to
SetPresetGrid.

Add Grid Settings... to View menu and move Show Grid from
preferences to View Menu to match Pcbnew.
2018-10-09 11:08:55 +01:00
Jeff Young a67d8c60df Fix text size measurement.
5.0 doesn't set the GAL's line width.  It gets away with this since
it's using the same GAL to measure as to set up the drawing, so
the width happens to be set correctly for other reasons.  5.1 uses
a separate GAL and so isn't so lucky.
2018-10-09 11:08:55 +01:00
Jeff Young 893f7641ce Handle hidden and dangling pins. 2018-10-09 11:08:55 +01:00
Jeff Young da4fb4ae3a Move galDisplayOptions access from pcbnew to common. 2018-10-09 11:08:55 +01:00
Tomasz Wlostowski 48d36f854e eeschema-gal: fix cursor shape switching 2018-10-09 11:08:55 +01:00
Tomasz Wlostowski b604f007d7 eeschema-gal: don't use kiROUND in the geometry library as it brings in a s*****load of wx dependencies due to #include <base_units.h> 2018-10-09 11:08:55 +01:00
Tomasz Wlostowski 2cbd08d4c0 eeschema-gal: make some functions virtual 2018-10-09 11:08:52 +01:00
Tomasz Wlostowski 7bccd26078 eeschema-gal: removed unused headers 2018-10-09 11:08:52 +01:00
Tomasz Wlostowski ef1f01a8bd VIEW: use BOX2D for view boundary 2018-10-09 11:08:52 +01:00
Tomasz Wlostowski 838458bc3a eeschema-gal: Base refactoring before GALification of the eeschema legacy canvas.
Note: it's only the renderer that is changed from wxDC to GAL. Tools stay the same, consider this a temporary hack.

This commit splits the EDA_DRAW_FRAME, EDA_DRAW_PANEL and BLOCK_SELECTOR classes into two variants, each independently compiled into a static library.
- "legacy_wx" for PCBnew/Gerbview - wxDC-based legacy canvas. We have full GAL support there anyway so it makes no sense to introduce GAL rendering API to the legacy tools.
- "legacy_gal" for EEschema and the rest - GAL-based legacy canvas, using legacy tools but with a GAL renderer.
Such split ensures only a small part of the common library and eeschema is affected, without messing around with already GALified tools.

The commit also removes some header dependencies on class_drawpanel.h
2018-10-09 11:08:52 +01:00
Tomasz Wlostowski f82f310dd5 eeschema-gal: added EnableDepthTest() feature in GAL 2018-10-09 11:08:52 +01:00
Tomasz Wlostowski 7e1458a9ce eeschema-gal: implement IsBackgroundDark() 2018-10-09 11:08:52 +01:00
Tomasz Wlostowski 0d720fdeff eeschema-gal: factor out EDA_DRAW_PANEL from BITMAP_BASE, remove some unnecessary includes of class_drawpanel.h 2018-10-09 11:08:52 +01:00
Jeff Young 3024ded91e Improve robustness of numeric evaluation.
It would appear that some platforms process the KILL_FOCUS event
after running TransferDataFromWindow().  This change makes sure
that the evaluation is done no matter the order.

Fixes: lp:1793911
* https://bugs.launchpad.net/kicad/+bug/1793911
2018-10-08 12:59:40 +01:00
Wayne Stambaugh 34ea79eddb Fix LIB_ID illegal character tests.
The '/' and ':' are reserved and cannot be used in symbol or footprint
names.  They will cause the LIB_ID parser and formatter to fail.  While
it seems like they should be legal in symbol alias names, they will
trigger a symbol rescue the next time the schematic is loaded.

Use ID_SCH as in the Eagle schematic plugin rather than ID_ALIAS to
ensure symbol names do not need rescued the next time the schematic is
opened.

Remove ID_ALIAS since the rules for alias names are the same as the
rules for symbol names.  Otherwise, allowing '/' and ':' in alias names
will force a symbol rescue on the next schematic load.

Fixes lp:1795600

https://bugs.launchpad.net/kicad/+bug/1795600
2018-10-07 09:09:27 -04:00
jean-pierre charras d2585fda50 DIALOG_SHIM: make default style wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER. 2018-10-04 18:03:46 +02:00
John Beard 3a9e7a496a Centralise some UI constants, use in hotkey lists
There are lot of places where constants are used in the KiCad UI
as "magic numbers". The most common one is "5", used in many
wxFormBuilder and manual UI constructions as the margin.

This commit provides a place for all UI to look up shared
constants and other functions, to help create a consistent UI using
functions that provide meaning and intent to these magic numbers.
2018-10-04 07:47:21 -04:00
John Beard 0be9667c96 Add read-only option for hotkey list, use for list dialog
This replaces the flat HTML list dialog with a read-only
version of the editor dialog in a pared-down dialog.

Fixes: lp:1778374
* https://bugs.launchpad.net/kicad/+bug/1778374
2018-10-04 07:47:21 -04:00
John Beard 7c2c8d307e Add tooltips to hotkey dialog buttons
THis is done in the generic widget, so other users can
benefit from it.
2018-10-04 07:47:21 -04:00
John Beard 23038b1550 Simplify hotkey editor widget
This is in preparation for making this widget optionally read-only.

Major changes:

* Construct panel in code, not with wxFormBuilder. This make's it
  easier to conditionally construct elements that won't be used
  in a read-only mode (e.g. the buttons).
* Use a generic "button row panel" widget for the buttons, as the
  sizing and layout logic is reusable in nearly all dialogs, and
  it's simplifies layout in the higher-level dialog widget. This
  widget is one example of many possible "reuable widgets".
2018-10-04 07:47:21 -04:00
John Beard 445a9fa963 Put cursor and pan control in libcommon/tool, enable in Gerbview
Put the cursor and pan control TOOL_ACTIONs in ACTION,
and refer to them in that way.

The handlers are currently identical in Pcbnew and Cvpcb,
and Gerbview (and all canvases) can benefit from them as well
if they are in libcommon. Also saves duplicated code.

Fixes: lp:1795855
* https://bugs.launchpad.net/kicad/+bug/1795855
2018-10-04 11:41:06 +02:00
Jeff Young c9ca1013b2 Make ModEdit and LibEdit library tree actions more consistent.
Adds Cut/Copy/Paste and Revert for footprints; introduces a new
shared Revert Changes? dialog; hooks up Add Library for footprints,
standardizes the Save As terminology.
2018-10-03 22:46:41 +01:00
John Beard 3da0d03c36 Centralise utilities for env variables.
This puts generic logic for KiCad environment vars in
one place.

Also updates the DIALOG_CONFIGURE_PATHS help to document
the new KICAD_USER_TEMPLATE_DIR and KICAD_TEMPLATE_DIR.
2018-10-03 11:53:10 -04:00
Seth Hillbrand b3a5e08c2f pcbnew: Rename PCB_ZONE_T and remove from connectivity
SEGZONE types were confusingly named PCB_ZONE_T.  Zones in pcbnew are
now _only_ PCB_ZONE_AREA_T, so we name segzone types PCB_SEGZONE_T to be
clear.

This also removes processing of the SEGZONEs from connectivity
calculations.
2018-09-29 15:09:15 -07:00
Jeff Young 2eea45b50c Go back to earlier strategy for net selector popup.
This version makes use of lots of things learned going down the
other rat hole.  Avoiding the wxComboFocusHandler is key, as well
as specifying using the AltPopupWindow.

The key handler is still tricky with respect to those platforms
that use native controls, but the starting-key strategy is similar
to the one used with wxGrid text editors.
2018-09-29 22:07:31 +01:00
Jeff Young 3c2aafd7b7 Move Edit Symbol References to standard text/button control. 2018-09-29 22:07:31 +01:00
Jeff Young 5843b1a6a1 Possible solutions to <enter> and keyboard activation on GTK. 2018-09-29 10:28:19 +01:00
John Beard 704615721f Prevent segfault when undoing or resetting non-hotkey rows
This is caused by:

* Not checking the hotkey data is not null when performing a
  hotkey action
* Allowing hotkey actions on non-hotkey rows.

This fixes both of these, and adds an assert to warn if someone
does manage to fire a hotkey action on a non-hotkey row (but it
won't crash).

Fixes: lp:1794756
* https://bugs.launchpad.net/kicad/+bug/1794756
2018-09-28 08:28:30 -04:00
John Beard a294e8d6c4 Check for conflicts when reseting/undoing hotkey changes
It was possible to get conflicting hotkeys when undoing and resetting hotkeys
to defaults.

This uses the same logic as when setting hotkeys to avoid conflcits in these
other two cases.

Fixes: lp:1794730
* https://bugs.launchpad.net/kicad/+bug/1794730
2018-09-28 08:28:22 -04:00
John Beard 3283bd9fdc Mark modified hotkeys in the hotkey editor
THis uses a simple " *" suffix, as the wxTreeListCtrl-derivative
widget doesn't allow easy access to things like font style.
2018-09-28 08:28:16 -04:00
John Beard 9f38b70491 Add a filter box to hotkey dialog and filter using it
This uses a simple case-insensitive partial match, which is
a good start for the relatively limited number of hotkeys
generally present.
2018-09-28 08:28:04 -04:00
John Beard 4f0166e064 Add some hotkey store tests
This also adds some mocks to the libcommon test executable, which
hopefully will allow it to work with more of libcommon.
2018-09-28 08:27:57 -04:00
John Beard 1f2c8fa698 Separate storage at iteration of hotkeys from the HK list widget
This separates the "ground truth" store of hotkeys from what is shown
in the dialog. This will allow us to filter the displayed hotkeys
while keeping the same underlying data structures.

Now, the UI data items interact with an intermediate set of data, which
represents the "original" hotkey data, and the "changed" data. The
ultimate aim here is to allow UI elements to come and go, but the
hotkeys that are "in-edit" are preserved.

This also allows us to abstract some bookkeeping complexity
out of the WIDGET_HOTKEY_LIST class into a separate non-GUI
class.
2018-09-28 08:27:51 -04:00
Jeff Young f10635e8be More work on arbitrary characters in references, etc. 2018-09-27 14:44:42 +01:00
jean-pierre charras c8a89ee25a Remove dead code. 2018-09-27 13:17:48 +02:00
Jeff Young 521183a587 Work in progress to allow arbitrary chars in references, etc. 2018-09-27 11:56:51 +01:00
Jeff Young eaf3d48260 Simplification of the net selector code to fix GTK issues. 2018-09-27 11:52:58 +01:00
Jeff Young 86b654e493 Hook up 3D viewer to common preferences.
Also removes nanny limits on text sizes.

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

Fixes: lp:1794345
* https://bugs.launchpad.net/kicad/+bug/1794345
2018-09-25 20:47:03 +01:00
Jeff Young 37f7faf433 Move lock checks to CLIENT_SELECTION_FILTER.
Also checks render item visibility as well as layer visibility
when making selections.

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

Fixes: lp:1541756
* https://bugs.launchpad.net/kicad/+bug/1541756
2018-09-25 17:56:38 +01:00
Jeff Young 533b26e8a1 Add hotkey for viewing symbol datasheet.
Also fixes a bug when there are multiple datasheets to choose from.

Fixes: lp:1793978
* https://bugs.launchpad.net/kicad/+bug/1793978
2018-09-24 15:46:45 +01:00
Jeff Young 0309228276 Don't allow drawing to a zero-height or zero-width GAL canvas.
Fixes: lp:1793913
* https://bugs.launchpad.net/kicad/+bug/1793913
2018-09-22 22:06:40 +01:00
Jeff Young 666da3849b Make esc dismiss net and layer selector popups. 2018-09-22 16:23:13 +01:00
Seth Hillbrand f8784f30a8 Removing OpenMP
This commit finishes the removal of OpenMP from the KiCad codebase.
Removed in this commit are the OpenMP calls in 3d-viewer and
qa/polygon_triangulation as well as all references in CMakeLists.txt

std::thread is used instead for multithreaded computation
2018-09-21 12:44:20 -07:00
Jeff Young 42ab116bc2 Rewrite the NET_SELECTOR combobox in the hopes of better platform support. 2018-09-21 20:40:04 +01:00
Jeff Young ebb74fcc2b Honour diff-pair dimension changes while routing. 2018-09-18 20:37:00 +01:00
Jeff Young 9c708c6177 Use DP netclass values when custom or predefined are not selected.
Fixes: lp:1780670
* https://bugs.launchpad.net/kicad/+bug/1780670
2018-09-18 17:44:53 +01:00
Seth Hillbrand 9e33d38cd5 unit_binder: allow updates without triggers
Adds a helper function to allow unit binder calls that change a value
but shouldn't trigger wxevents
2018-09-17 15:55:22 -07:00
Jeff Young 02a3f83040 Implement poor-man's RTTI for use over KiWAY.
Fixes: lp:1777883
* https://bugs.launchpad.net/kicad/+bug/1777883
2018-09-15 20:06:42 +01:00
jean-pierre charras ab9288235c Fix compil warning 2018-09-13 09:04:58 +02:00
Seth Hillbrand 3ebba6cbe1 pcbnew: Limit zone simplification
Commit 73c229714 was a bit of a sledgehammer for the associated problem
of degenerate points.  This commit replaces that one by only performing
additional simplification of the zone polygons on those polygons that
fail our initial triangulation attempt.
2018-09-12 15:28:13 -07:00
Jeff Young 806b1fc63d Fix bugs to enable read-only grid cells to be copied.
Fixes: lp:1791129
* https://bugs.launchpad.net/kicad/+bug/1791129
2018-09-12 14:01:36 +01:00
Jeff Young cbb3492d98 Standardize Footprint Viewer and Footprint Browser.
Add Display Settings to Footprint Browser.
Make each of them OpenGL on OSX and Cairo on other platforms.
Allow auto-zoom to be turned off and save last zoom setting.
Make ordering of tools in htoolbar consistent.
Standardize grid and zoom drop-downs.

Fixes: lp:1791667
* https://bugs.launchpad.net/kicad/+bug/1791667
2018-09-12 14:01:35 +01:00
Seth Hillbrand 4d709d2392 pcbnew: adjust default soldermask/dam clearance
The previous clearance values were equivalent to the default copper
clearance, which could cause issues for users who didn't adjust the
values and had alignment errors at the board house.  New values default
to typical dry film minimums.

( cherry-picked from 2c5154c63 )

Fixes: lp:1786765
* https://bugs.launchpad.net/kicad/+bug/1786765
2018-09-08 06:45:09 -07:00
Seth Hillbrand e3924c12ee eeschema: Only allow dragging of draggable items
When expanding the drag item to allow corners, we accidentally picked up
other items in the list.  This limits the items that can be dragged to
only those that are explicitly in the draggable list.

A side effect of this commit is that when converting from move to drag
(with tab), items not in the draggable list will be left in place.

Fixes: lp:1787966
* https://bugs.launchpad.net/kicad/+bug/1787966
2018-09-06 13:44:37 -07:00
jean-pierre charras 80b25aa601 Fix incorrect calculations in WORKSHEET_DATAITEM::GetMarkerSizeUi()
It creates a lot of integer overflow in Pcbnew in Debug mode (Legacy mode), although it ha meaning onlt for the Page Layout Editor.
This function should be deprecated when the GAL canvas is used in Page Layout Editor.
2018-09-06 11:48:53 +02:00
Seth Hillbrand a6325aab29 Replacing Tesselation
Replaces Poly2Tri with updated code to process polygons faster and more
robustly.  Notably, we can now handle overlapping holes in the polygons,
allowing us to cache the triangulation of complex boards
2018-09-01 19:30:50 -07:00
Jeff Young c90a3efea2 Change KIDIALOG hashing algorithm to __FILE__ + __LINE__.
Using Title + Message wasn't working for all the dialogs which
did substitutions in the message (which was a lot of them).

Fixes: lp:1789348
* https://bugs.launchpad.net/kicad/+bug/1789348
2018-08-29 23:38:23 +01:00
Jeff Young 75a4928134 Split edge.cuts and courtyard layer defaults.
Fixes: lp:1788876
* https://bugs.launchpad.net/kicad/+bug/1788876
2018-08-29 20:08:01 +01:00
Jeff Young 895fc0b536 Add a cell editor for paths and use it in Configure Paths. 2018-08-29 20:08:01 +01:00
Jeff Young f9412f0fd4 Implement double-click for other filetypes in project tree.
Fixes: lp:1787207
* https://bugs.launchpad.net/kicad/+bug/1787207
2018-08-29 19:59:02 +01:00
Jeff Young 45bc1b1aff Add single-click editing to grid cells. (Experimental.) 2018-08-29 19:59:02 +01:00
Seth Hillbrand dc4125206b GAL: Add a selected item layer
The selected items should be displayed above the rest of the items but
below informational overlays.

Fixes: lp:1789505
* https://bugs.launchpad.net/kicad/+bug/1789505
2018-08-28 15:00:05 -07:00
Jeff Young a860a8db54 Enable user layers in footprint editor.
Fixes: lp:1746279
* https://bugs.launchpad.net/kicad/+bug/1746279
2018-08-27 18:38:56 +01:00
jean-pierre charras a330eb1575 Add Chinese traditional in language list. 2018-08-27 18:30:49 +02:00
qu1ck 72f87861bb pcbnew: Add toolbar buttons for action plugins
Allows optional toolbar buttons for action plugins.
2018-08-26 19:39:27 -07:00
Tomasz Wlostowski 32d262b0fe EDA_TEXT: add missing header 2018-08-24 14:42:49 +02:00
Tomasz Wlostowski 2186db976b VIEW: added support for VIEW_OVERLAYS (temporary overlays for drawing debug graphics)
x
2018-08-24 14:42:49 +02:00
Jeff Young 020c7b5cb8 Fix non-OSX compile issue (includes). 2018-08-24 12:07:05 +01:00
Jeff Young d10bfb13d6 Re-enable text layers now that DRC & zone fills are fixed.
Fixes: lp:1788268
* https://bugs.launchpad.net/kicad/+bug/1788268
2018-08-24 10:56:13 +01:00
Jeff Young 0e3919e7aa Fix DRC & zone filling for copper text in footprints.
Also improves handling of copper edges in footprints and of text
and track locations in DRC markers.

Also adds DRC for tracks & zones.

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

Fixes: lp:1788268
* https://bugs.launchpad.net/kicad/+bug/1788268
2018-08-24 10:56:13 +01:00
Jeff Young ec9d38e21f Add filter to net selector widget.
Also fixes a bug where nets wouldn't get changed because the
pads weren't changed and so the pad nets would propagate and
wipe out the changed nets on the tracks.

Also includes warning dialogs that pad nets will be changed if the
track nets are.

Fixes: lp:1779854
* https://bugs.launchpad.net/kicad/+bug/1779854
2018-08-24 10:56:13 +01:00
Tomasz Wlostowski 6765ab6975 POLY_GRID_PARTITION: fixed incorrect point-in-polygon test in some corner cases
Fixes: lp:1787236
* https://bugs.launchpad.net/kicad/+bug/1787236
2018-08-23 13:38:41 +02:00
Andrew Zonenberg 60a55d75fa Split prohibited text layers for footprints and the rest of the PCB
Fixes: lp:1788268
* https://bugs.launchpad.net/kicad/+bug/1788268
2018-08-21 16:34:53 -07:00
Jeff Young a6d10d6e28 Constant-size page layout object handles w/respect to zoom.
Fixes: lp:1787491
* https://bugs.launchpad.net/kicad/+bug/1787491
2018-08-21 10:34:41 +01:00
Jeff Young 86a801aabc Allow updating of file history size on the fly.
Also updates the file menu IDs so that we can actually handle
more than 9 items in the file history.

Also adds configurable file history length to the other gerber
files (zip, drill and job).

Fixes: lp:1745729
* https://bugs.launchpad.net/kicad/+bug/1745729
2018-08-21 10:34:41 +01:00
José Jorge Enríquez 8d625854b8 Allows custom number of entries in recently opened files menu.
NEW: Adds a configuration option to set number of entries in the "Open Recent" menu.

Fixes: lp:1745729
* https://bugs.launchpad.net/kicad/+bug/1745729
2018-08-21 10:34:41 +01:00
Jeff Young d72fdaed29 Rewrite Library Symbol Properties dialog.
Fix the user-model issues around aliases and alias selection.
Fold Library Symbol Fields into Library Symbol Properties.
Update to the new look.

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

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

Fixes: lp:1786339
* https://bugs.launchpad.net/kicad/+bug/1786339
2018-08-14 13:54:04 +01:00
Jeff Young 08e04acb10 Add missing include for non-OSX platforms. 2018-08-12 01:09:56 +01:00
Jeff Young 4b1a31ffad Regularize save-changes dialogs. 2018-08-12 00:02:37 +01:00
Jeff Young d81faa72c9 Overhaul border drawing in all the Kicad frames.
Primary change is to replace most control/window borders with
AUI pane borders.  We implement our own AUI border drawing
routine which avoids the ugly one-pixel white frames around
dark canvasses.

Also increases the signal-to-noise ratio of all the pane
creation code in the various frames.
2018-08-11 17:25:38 +01:00
Jeff Young 7c04d8be1c Double opening speed of PCBs with ground and/or power planes.
(Or any other boards with complicated zones.)
2018-08-07 17:01:44 +01:00
Seth Hillbrand 539ca5aa3b Adjust RTree default floating point to use double
This reverts the previous work-around 7d62f14dd for the RTree splitting
degeneracy that was placed prior to v5.  It appears not to have worked
for all systems.  In its place, we use doubles instead of floats to
calculate the bounding box when filling the RTree.  This keeps maximum
volume items from overlapping with the system boundary in test cases.
2018-08-06 16:55:00 -07:00
Jeff Young d788c9d479 Move library table dialogs from PLAYER to KIFACE interface.
Spooling up a full PLAYER in the background takes too long.

This also fixes bugs around how the tables are saved, although
that was just missing code rather than anything architectural.

Fixes: lp:1785436
* https://bugs.launchpad.net/kicad/+bug/1785436
2018-08-06 21:31:53 +01:00
Jeff Young be1d6113d6 More performance enhancements.
Be more intelligent about sorting lib tree items.  (Footprint
entries, for instance, come out of an already-sorted list.)

Don't recreate menus twice when laoding Footprint Editor.

More pervasive use of WX_FILENAME to avoid expensive calls to
wxFileName::SplitPath() and string concatenation.

For POSIX kernels do all the work on the file-system side so we
don't have to keep converting back and forth between encodings.
2018-08-06 13:49:27 +01:00
jean-pierre charras 0902bbabc5 Allows bigger max page size (120x120") in Eeschema, Gerbview and Page Layout Editor
Due to its small internal unit, pcbnew still have a max page size of 48x48"

Fixes: lp:1785155
https://bugs.launchpad.net/kicad/+bug/1785155
2018-08-04 17:19:48 +02:00
jean-pierre charras c32fcd1403 Fix commit f3f814e622 that breaks the compilation on Windows.
Fiw also a minor compil warning
2018-08-04 17:18:15 +02:00