Commit Graph

10235 Commits

Author SHA1 Message Date
Tomasz Włostowski 0a55d8e053 Fixed differential pair gap clearance error when gap equaled minimum clearance.
Fixes: lp:1533551
* https://bugs.launchpad.net/kicad/+bug/1533551
2017-03-11 20:57:59 +01:00
Maciej Suminski 3fafd48764 Fix drawing circles in GAL
Fixes: lp:1672039
* https://bugs.launchpad.net/kicad/+bug/1672039
2017-03-11 20:30:24 +01:00
jean-pierre charras 2c56085f41 Drc calculations fix a minor issue that detected a bad clearance when distance between a circle and a segment was the clearance value.
Also, give a margin of 1 nanometer during DRC calculations to avoid false error DRC detection due to rounding issues.
2017-03-11 18:09:18 +01:00
Chris Pavlina 5af825e21c Use ki_mutex.h in FOOTPRINT_PREVIEW_PANEL 2017-03-11 08:22:08 -05:00
Chris Pavlina 23a23d3c63 Fix typo in fp-lib-table help text
Fixes: lp:1671910
* https://bugs.launchpad.net/kicad/+bug/1671910
2017-03-10 23:44:12 -05:00
Chris Pavlina bbaa29fbc4 Refactor FOOTPRINT_PREVIEW_PANEL
- Pull out compound widget bits into FOOTPRINT_PREVIEW_WIDGET
- Move all pcbnew-specific bits *inside* pcbnew; implementation should
  be private for users
- Make a few class members and inner types private
2017-03-10 23:26:45 -05:00
jean-pierre charras de30dc9f5d Speed up schematic libraries loading. 2017-03-10 21:17:56 +01:00
Chris Pavlina a72d32d3fd Test for dangling pins after symbol is edited
Fixes: lp:1562897
* https://bugs.launchpad.net/kicad/+bug/1562897
2017-03-10 12:01:12 -05:00
Maciej Suminski f46961d003 Fix a memleak in COLOR_SWATCH 2017-03-10 17:56:41 +01:00
John Beard 8c3b8ee693 Add a ruler tool to pcbnew GAL
This allows to measure between features on a PCB. It uses a preview
EDA_ITEM in common, but due to the use of the IDs, it's currently
Pcbnew/Modedit only.

This also adds several "utils" for graphical functons useful when
drawing preview items on GAL canvases.

Fixes: lp:1467313
* https://bugs.launchpad.net/kicad/+bug/1467313
2017-03-10 16:21:44 +01:00
John Beard 9c08873210 Make SELECTION_AREA a generic overlay item
This simplifies the (already simple) SELECTION_AREA class. It is also
moved into KIGFX::PREVIEW and put in the common library, where it can be
reused by other GAL-aware tools (not just in Pcbnew) in future.
2017-03-10 16:21:44 +01:00
John Beard 5e84e953f3 Add a simple item class for graphical overlays
This introduces SIMPLE_OVERLAT_ITEM, which is an abstract EDA_ITEM,
designed for use as an overlay for assisting interactive tools.

The item is drawn only on the GP_OVERLAY layer, and sets the fill,
stroke and line properties before calling a virtual function to draw the
shape, which will depend on the implementaiton of the derived class.

The motivation here is to simplify and unify basic overlays used when
in interactive tools. It is not designed to be the base class of all
possible overlays - more complex ones would be more clearly represented
as their own derivative of EDA_ITEM.

Applications of this class can include: zoom/select rectangles, zone
polygon previews, geometric shape helpers, and so on.
2017-03-10 16:21:44 +01:00
Wayne Stambaugh 9636086f52 Fix build bug for const incorrectness. 2017-03-10 10:09:55 -05:00
Wayne Stambaugh cc64c6af1d Fix broken symbol link in schematic after editing.
The save current symbol command had a different code path then save current
library so the schematic symbol was not being refresh after is was modified
in symbol editor.

Split out the save current symbol command from Process_Special_Functions()
to help reduce function growth hormone imbalance syndrome.

Some coding policy fixes and wxT() macro removal.

Fixes lp:1671456

https://bugs.launchpad.net/kicad/+bug/1671456
2017-03-10 08:39:29 -05:00
Chris Pavlina 7bf4c90be5 Component chooser: properly normalize description/keywords
Fixes: lp:1671814
* https://bugs.launchpad.net/kicad/+bug/1671814
2017-03-10 08:34:20 -05:00
Maciej Suminski d337d08060 Sketch graphics mode for GAL 2017-03-10 14:08:59 +01:00
Maciej Suminski f21cfa167f Use DECIDEG2RAD function in PCB_PAINTER 2017-03-10 14:08:59 +01:00
Maciej Suminski 737dc20409 Make OpenGL GAL great again
Reenabled VIEW_ITEMs cache. Previously, the first init was called with
GAL_TYPE_NONE, causing all layers to be set to non-cached. During the
proper init, the layers were already set to non-cached and were not
changed.
2017-03-10 14:08:59 +01:00
Maciej Suminski 11f8e53e27 Smoother arc rendering in OpenGL GAL
Fixes: lp:1496114
* https://bugs.launchpad.net/kicad/+bug/1496114
2017-03-10 14:08:59 +01:00
Jon Evans 3208d24ad4 Add DrawArcSegment() GAL method, to support drawing outlined arcs 2017-03-10 14:08:59 +01:00
jean-pierre charras 0be56451b1 More optimization in project rescue. 2017-03-10 10:31:50 +01:00
John Beard c523ba45e1 Fix shadowed variable in python_scripting.cpp 2017-03-10 09:08:45 +01:00
jean-pierre charras 4605cae588 Displays the number of instances to modify in rescue dialog. 2017-03-09 19:16:24 +01:00
jean-pierre charras ae7e3f725b Speed up project rescue calculations, by optimizing the number of searches in libs. 2017-03-09 18:13:03 +01:00
jean-pierre charras 2a91d7bc21 Speed up SCH_COMPONENT::ResolveAll(). 2017-03-09 15:46:12 +01:00
jean-pierre charras a592832886 fix I18n issue (empty string) 2017-03-09 11:47:40 +01:00
Chris Pavlina a73abbfc31 Fix possible threadsafety issue in FOOTPRINT_PREVIEW_PANEL 2017-03-08 17:02:10 -05:00
Chris Pavlina 82f587f4ff Show the busy cursor while loading component chooser 2017-03-08 15:34:11 -05:00
Chris Pavlina 2e4e0a9a05 Minor cleanup in cmp_tree_model_adapter.h 2017-03-08 14:49:00 -05:00
Chris Pavlina 7ee0adabd7 Optimize component chooser startup time more
- Stop wx from sorting the items. We've already sorted them, and
  profiling shows our sort is faster than theirs.

- Go back to using strings as cache keys, because using pointers means
  the cache doesn't survive from one invocation to the next. Switch to
  wxHashMap because it can use wxString keys in an unordered (faster)
  map.
2017-03-08 14:41:34 -05:00
Chris Pavlina 28848373ce CMP_TREE_MODEL: add the correct number of units
Fixes: lp:1671174
* https://bugs.launchpad.net/kicad/+bug/1671174
2017-03-08 12:39:44 -05:00
Chris Pavlina 3bddc14dc6 CMP_TREE_MODEL_ADAPTER: use more suitable cache type
Fixes: lp:1671086
* https://bugs.launchpad.net/kicad/+bug/1671086
2017-03-08 12:34:11 -05:00
Chris Pavlina 2232edfb87 Rewrite DIALOG_CHOOSE_COMPONENT without wxFormBuilder
This will allow near-future use of controls not supported by
wxFormBuilder with minimal hackery.
2017-03-08 12:00:49 -05:00
Simon Richter ae9bbf7aeb Fix building benchmark test
Passing a wxString to std::ifstream::ifstream() is ambiguous, at least on MSVC.
2017-03-08 10:45:26 -05:00
Simon Richter bb61cd5a50 Add missing header
color_swatch.cpp uses std::unique_ptr
2017-03-08 10:39:11 -05:00
Simon Richter ef0a5ff71c Make Mac-specific function conditional
If we want to have an override marker on this function, it needs to be
conditional on Mac.
2017-03-08 10:24:59 -05:00
Maciej Suminski 62235348d1 Use GAL axes instead of a ORIGIN_VIEWITEM in module editor 2017-03-08 10:35:51 +01:00
Jon Evans 2513f0b002 Add setting to have GAL draw axes on the grid 2017-03-08 09:37:40 +01:00
Maciej Suminski 14cbdcec1f Fixed mismatched new[]/delete in 3D viewer 2017-03-08 09:12:16 +01:00
Chris Pavlina cf373e543f Fix Windows (and macOS?) build error caused by 11f4622ea 2017-03-07 17:51:25 -05:00
Chris Pavlina 36e400ec5b Avoid collapsing component chooser column widths to zero
Fixes: lp:1670762
* https://bugs.launchpad.net/kicad/+bug/1670762
2017-03-07 14:59:51 -05:00
Chris Pavlina 11f4622ea5 Fix GL assertion failure during GAL teardown 2017-03-07 14:37:02 -05:00
Chris Pavlina 3854637ec5 Footprint preview: do not Freeze/Thaw
This causes issues under Ubuntu Unity (possibly due to calling Show()
while frozen).

Fixes: lp:1670705
* https://bugs.launchpad.net/kicad/+bug/1670705
2017-03-07 14:32:02 -05:00
Wayne Stambaugh ef74f245cb Fix broken HTML formatting in about dialog. 2017-03-07 14:18:37 -05:00
Tomasz Włostowski eedf7cb243 Switched coroutine library from Boost libcotext to custom libcontext.
Fixes lp:1658249

https://bugs.launchpad.net/kicad/+bug/1658249
2017-03-07 11:45:29 -05:00
Maciej Suminski 338735c5bf Added a missing include to tool_manager.h
Previously full information about VC_SETTINGS type was not
available, so it was not possible to create a VC_SETTINGS stack
for some compilers.
2017-03-07 17:18:58 +01:00
Maciej Suminski c6e3ac7067 Removed boost::adaptors from TOOL_MANAGER 2017-03-07 17:18:22 +01:00
Julius Schmidt 29eb696ef7 Fix crash when switching from dragging to routine (PNS router)
The attached patch fixes a bug where triggering InlineDrag while routing
is in progress will crash pcbnew.  The problem is that the InlineDrag
event does not terminate performRouting.  Once InlineDrag is finished
it will call StopRouting which deletes the m_placer.  The Wait() in
performRouting will then return and it will crash as soon as it tries
to access the m_placer.
2017-03-07 13:56:44 +01:00
John Beard c86773462f GAL: Respect SHAPE_LINE_CHAIN closed setting
When drawing polylines using SHAPE_LINE_CHAIN, the polyline is always
was drawn closed in GAL and open in Cairo, regardless of the state of
SHAPE_LINE_CHAIN.
2017-03-07 13:28:14 +01:00
José Ignacio Romero 45d1082517 Make all layers slightly semitransparent as before 2017-03-07 11:57:52 +01:00