Commit Graph

5044 Commits

Author SHA1 Message Date
Jeff Young cc573eed31 Patch crash bug when closing symbol properties dialog. 2020-01-12 19:55:00 +00:00
Ian McInerney 960b553a70 Cleanup type casting in EE toolbase
* Ensure the lib edit undo checks for pointer validity
* Assert that the frames are the correct type (satisfies coverity)
* Convert C casts to C++ casts
2020-01-12 19:47:13 +00:00
Ian McInerney cd0d92956b Use static cast in sch_view since type has been checked 2020-01-12 19:46:17 +00:00
Ian McInerney b445ce6632 Clean up pointer casting
* Make note of when dynamic cast is actually needed
* Convert some to static cast when we know the type for sure
2020-01-12 19:45:37 +00:00
Ian McInerney 00e58cd974 Fix unintialized values (from coverity scan) 2020-01-12 13:00:42 +00:00
Ian McInerney ae91312416 Fix default pin orientation (from Coverity scan) 2020-01-12 11:55:03 +00:00
Seth Hillbrand 84d5d6c168 Eeschema: Return null in case of canceling placement 2020-01-11 17:02:55 -08:00
Jeff Young 3d8150032f Fix some uninitialized variables found by Coverity. 2020-01-11 21:29:25 +00:00
Jeff Young 1591d13839 Use static_cast since we've already checked the type.
This is faster and also keeps Coverity happy.
2020-01-11 21:29:25 +00:00
Jeff Young 677fcee0d2 Remove exception which is not caught in most code paths. 2020-01-11 21:29:25 +00:00
Ian McInerney f896043067 Fix comments for switch statement fall throughs
This cleans up all GCC warnings (-Wimplicit-fallthrough=2) about
implicitly falling through switch cases.
2020-01-11 19:16:32 +00:00
Seth Hillbrand 7c28c3838a Comment-only changes
Makes class comments conform to coding standards
2020-01-10 16:43:01 -08:00
Seth Hillbrand 94f682c6bd Fix bug in linux compile
wx 3.0 does not have an emplace_back method for wxVector
2020-01-10 16:41:55 -08:00
Seth Hillbrand d1a0102e84 eeschema: Fix print order between worksheet and screen
The worksheet should be drawn behind the screen.
2020-01-10 16:33:53 -08:00
Seth Hillbrand c2904ce7e9 Fixing drawing order when plotting/printing
This is a partial re-work of a previous commit to the v5 branch
(8f7278e34f) that fixes #368
2020-01-10 16:33:53 -08:00
Jeff Young 88eab8134e Fix a couple of uninitialized variables (from Coverity scan). 2020-01-11 00:11:31 +00:00
Jeff Young 7bb9551801 Handle boost exceptions. (From Coverity scan.) 2020-01-11 00:04:01 +00:00
Jeff Young 33da81cd27 Repair Coverity scan defects. 2020-01-10 23:17:54 +00:00
Jeff Young b54a42ba53 Clean up dialog (including uninit var from Coverity scan). 2020-01-10 22:32:50 +00:00
Jeff Young 8576a4a067 Fix unchecked array access (from Coverity scan). 2020-01-10 22:32:50 +00:00
Jeff Young 8abfc13053 Fix possible null dereference (from Coverity scan). 2020-01-10 22:32:50 +00:00
Jeff Young cc5a42ff41 Minor cleanup and performance. 2020-01-10 22:32:50 +00:00
Jeff Young ae74815ff0 Go to seleted object when opening Symbol Fields dialog.
Note: only active if there is a single item selected and it (or
its parent) is a component.
2020-01-10 22:32:50 +00:00
Jeff Young 5e5edd03f6 Implement super- and subscript printing and plotting for eeschema. 2020-01-10 22:32:49 +00:00
Seth Hillbrand 77c60d9655 Remove the last vestiges of dlist
It served us (mostly) well for more than a decade.  It helped KiCad grow
before the std:: came into decent shape or speed.  It was a good little
list.

RIP DLIST 2008-2020
2020-01-10 06:37:08 -08:00
Seth Hillbrand 6e5e453d0d Replace EESchema DLIST
This moves EESchema DLIST structures to rtree.  These changes are more
fundamental than the pcbnew changes from 9163ac543 888c01d11 d1877d7c1
and 961b22d60 as eeschema operations were more dependent on passing
drawing list references around with SCH_ITEM* objects.
2020-01-10 06:37:08 -08:00
Wayne Stambaugh f53aa51326 Fix save library bug in symbol editor.
Add try/catch blocks when saving symbols using a plugin object directly
to prevent potential unhandled exception bugs.  I'm not totally happy
using wxLogError to flag exceptions but I couldn't think of a better way
to handle them.

Fixes #3665

https://gitlab.com/kicad/code/kicad/issues/3665
2020-01-09 11:23:46 -05:00
jean-pierre charras 3f161965cd Eeschema: Draw selected global labels:fix incorrect text drawing.
Happens only on Cairo.
Was due to the fact on cairo the shape area was deleted  after the shadow
text was drawn, and only the second text was seen.

Fixes #3745
https://gitlab.com/kicad/code/kicad/issues/3745
2020-01-09 14:43:46 +01:00
jean-pierre charras 03611f7bb7 missing change 2020-01-09 09:14:04 +01:00
jean-pierre charras c17c9960d8 Eeschema: fix a colliding name between sch_text.h and a Windows/msys2 header.
"INPUT" declaration in sch_text.h generate *a lot of* compil warnings.
So it is replaced by PS_INPUT.
For consistency, others member of enum class PINSHEETLABEL_SHAPE are also renamed.
2020-01-09 08:52:30 +01:00
Mark Roszko ca34ade00c Make global labels have the same spin style as net/hierarchical labels
For legacy reasons, it stored left and right "spin" as flipped integers in the file format.
But the code handled the flip in multiple locations rather than just doing it on file io.
This change unifies the internal code and does the mapping in the file I/O.
2020-01-08 19:07:55 +00:00
jean-pierre charras fd0d5fdb38 HIERARCHY_NAVIG_DLG: fix crash when in a subsheet one open the dialog
and switch to the paren sheet from the context menu.

Mainly, change the way the dialog is managed from the sch_edit_frame:
the pointer to find the created dialog is replaced by a call to wxWidows::FindWindowByName().

Using a pointer set and cleared by events is a recipe for crashes.
2020-01-08 15:01:22 +01:00
Seth Hillbrand 2321da702f Fix SCH_LINE::GetBoundingBox()
Instead of returning a fixed line width that was rather large, we use
the actual line width
2020-01-07 11:56:50 -08:00
Jonatan Liljedahl 4378290094 Fix menu string capitalization for simulator Dotted Current/Phase 2020-01-07 19:45:44 +00:00
Jonatan Liljedahl f433037dcd Eeschema: simulator: allow dotted traces for current and phase.
ADD: Allow drawing of current and phase traces with dotted style
for easier differentiation from voltage and magnitude. The option
is available in the View menu of the simulator.
2020-01-07 19:45:44 +00:00
Ian McInerney 13b6028e1b Refactor all math into a new kimath library
* Split up the thirdparty code into the thirdparty folder (#3637)
* Create a new kimath static library containing all the math functions

This is part of cleaning the build system for #1906.
2020-01-07 17:12:59 +00:00
Simon Richter 270aaec443 Rewrite FBP files generated with unreleased wxFB
These use a few features that are too new, causing errors when trying to
edit with a released version of wxFormBuilder.
2020-01-07 13:32:33 +00:00
Jon Evans b4cc28a5b6 Fix memory leaks in CONNECTION_GRAPH
Fixes #3692
2020-01-07 00:13:19 -05:00
Ian McInerney 0c10bab412 Add base class constructors to some copy constructors 2020-01-06 19:55:39 +00:00
Seth Hillbrand daac749927 eagle import: Convert to new eeschema units
This adjusts most (hopefully all) of the eagle conversion hard-coded mil
values into the new eeschema internal unit values
2020-01-06 11:11:15 -08:00
Seth Hillbrand 1e843922cd Formatting sch_eagle_plugin.cpp only
No code changes, just adjusting to match code style
2020-01-06 09:39:51 -08:00
Jonatan Liljedahl 2f52ef33b4 Convert selection shadow width to internal units.
Fixes https://gitlab.com/kicad/code/kicad/issues/3740
2020-01-06 14:42:03 +00:00
Seth Hillbrand 850ca98e7b Remove outdated RoundTo0
With internal units in 100nm, there are no rounding errors when
representing mm coordinates in eeschema.
2020-01-06 05:15:14 -08:00
Jon Evans 856decc29b Fix a few issues with bus member propagation to subsheets
Fixes #3728
2020-01-04 10:38:50 -05:00
Jon Evans 5255a29bc0 Always use local bus member names for unfolding menu 2020-01-03 22:11:00 -05:00
Jon Evans 112be3bfd1 Allow unannotated power connections to drive nets 2020-01-03 22:09:56 -05:00
Jon Evans d5a80e9cfd Fix shadowing warning 2020-01-03 18:52:46 -05:00
Franck Jullien ea218bc722 eeschema: Allow hierarchy navigator to stay open
ADD: User can now decide to keep the hierarchy navigator open while working
on a schematic.

This behavior can be configured in eeschema->preferences->eeschema->Editing options.
2020-01-03 21:08:40 +01:00
Seth Hillbrand d1a05e27a5 eeschema: Correct junction test routine
New v6 can test multiple points not previously considered.  This
corrects the test to ensure that junctions are correctly added when
lines are present.

Fixes #3729 | https://gitlab.com/kicad/code/kicad/issues/3729
2020-01-03 11:46:05 -08:00
Seth Hillbrand 3fb085a0b4 eeschema: Move comparison for DANGLING_ENDS
The comparison functions belong inside the class if we are using them to
test the validity of the class.
2020-01-03 11:46:05 -08:00