Commit Graph

19516 Commits

Author SHA1 Message Date
Ian McInerney 72a1c71e07 Implement a framework to handle wxUpdateUIEvents for tool actions
This allows for the tool framework to keep track of a universal
set of conditions for the UI state (enabled/checked/shown) for
controls of actions. It removes the need for the main menubar
menus to be CONDITIONAL_MENUs and be rebuilt on each open,
and instead makes the updates of the check and enabling of
items handled in the native wxWidgets way.

This commit switchs the 3d viewer and kicad project manager window
over to this system.
2020-08-16 19:10:25 +00:00
Ian McInerney d19ff3e595 Unify the UI IDs for actions between the menus and toolbars
By unifying the IDs so that an action only has one UI ID,
it will receive only one update event that will work for
all controls using the action.
2020-08-16 19:10:24 +00:00
Jon Evans 6cb0343c6a Fix typo causing repeated migration 2020-08-16 14:55:00 -04:00
Jeff Young 15edac4738 Implement a more flexible layout for the objects tab of appearances. 2020-08-16 19:51:26 +01:00
Jon Evans 54682d39ff Remember width of right AUI panel in PcbNew 2020-08-16 14:33:40 -04:00
Jon Evans 92174d414c Ensure pads and zones come up visible by default
These visibility layers didn't exist until now
2020-08-16 10:17:20 -04:00
Jon Evans 6bfb32245b Show the Default netclass in the appearance panel 2020-08-16 09:57:21 -04:00
Jon Evans 7da5419a2c Reduce flicker on layout change in MSW 2020-08-16 09:38:12 -04:00
Jon Evans 1f5a3c57a0 Fix net color radio buttons 2020-08-16 09:32:03 -04:00
Ian McInerney 453976be5e Add cleanup to the new appearance widget
It really should be cleaning up the heap-allocated objects
it owns.
2020-08-16 12:37:51 +01:00
Ian McInerney d01e22232a Remove unused GerbView IDs for items that were already actions
All these IDs were for commands that have already been transitioned
to actions and there was no wxCommandEvent interface for them.
2020-08-16 12:37:51 +01:00
Ian McInerney 61cdf3436b Ensure PAINTER::Draw routines properly handle EDA_ITEM casting
EDA_ITEM is a child of VIEW_ITEM, so a static_cast is not appropriate,
since in some cases it could be called with a non-EDA_ITEM argument.
This was triggering an ASAN heap-buffer-overflow in GerbView.
2020-08-16 12:37:51 +01:00
Ian McInerney 0975f3817a Fix project handling in eagle project import and ensure the titlebar is correct
Previously it didn't properly close or create a new project for the
Eagle project.

Also, update the titlebar text whenever the project changes (so it is
cleared properly when a project is unloaded).

Fixes https://gitlab.com/kicad/code/kicad/issues/5152
2020-08-16 12:37:51 +01:00
Ian McInerney 4c535c160c Set the about program name for cvpcb 2020-08-16 12:37:51 +01:00
Ian McInerney 25f2a13157 Fix pcbnew/fpedit editing options panel
The panel was incorrectly saving the preferences for the footprint
editor.
2020-08-16 12:37:50 +01:00
Ian McInerney ade7f529b8 Switch shared_ptr creation to using make_shared 2020-08-16 12:37:50 +01:00
Jeff Young 198d9a4243 Fix merge conflicts. 2020-08-16 12:26:15 +01:00
Jeff Young 92322667d6 Fix asserts on later wxWidgets versions.
Fixes https://gitlab.com/kicad/code/kicad/issues/5197
2020-08-16 11:49:36 +01:00
Jeff Young e5f2015a9c More spacing adjustments for appearance manager. 2020-08-16 01:55:09 +01:00
Jeff Young 5938528a16 Move to conditional compilation for appearance palette spacing. 2020-08-16 00:43:19 +01:00
Jon Evans 103443f496 Back out some spacing changes for MacOS
These were too aggressive on other platforms
2020-08-15 19:20:49 -04:00
Jon Evans c124934831 Improve tooltips 2020-08-15 19:07:26 -04:00
Jon Evans 0db00046d1 Fix rendering of net colors on items 2020-08-15 18:50:44 -04:00
Jon Evans beab35472b Fix wrong style for slider
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5197
2020-08-15 18:50:44 -04:00
Jeff Young f83a9c0a22 Clean up some OSX issues in new appearance panel. 2020-08-15 23:26:58 +01:00
PJM f58221ca98 Add 'GetBoundingBox' that optionally only calcs w visible fields
Cross-probing from Pcbnew to Eeschema revealed that EEschema was
including all fields, visible or not, when calculating the bounding
box of the probed componentt.  This caused problems with long strings
such as URLs that were not set as visible.  The cross-probing code
tries to minimize 'Zoom to Fit' operations when it's not necessary,
and the overly large bbox values often resulted in zooms not being
performed and components displayed very small.

This code adds a version of 'GetBoundingBox' that takes a boolean
to tell it to include invisble fields or not.

Addresses issue: https://gitlab.com/kicad/code/kicad/-/issues/5149
2020-08-15 22:15:30 +00:00
Jon Evans 2f604b4494 Add selection filter to footprint editor 2020-08-15 16:42:19 -04:00
Jeff Young 57c3d8e8d8 Make sure preview group gets added to view after a clear. 2020-08-15 21:13:44 +01:00
Jon Evans bd14f8a82a ADDED: New appearance control widget for PcbNew
Featuring:
- Layer view presets
- Per-type opacity for tracks, vias, pads, zones
- Net and netclass color and visibility controls

CHANGED: Simplified object visibilty controls

Fixes https://gitlab.com/kicad/code/kicad/-/issues/1951
Fixes https://gitlab.com/kicad/code/kicad/-/issues/1981
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2003
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2173
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2254
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4325
2020-08-15 15:24:28 -04:00
Jeff Young d7f26cfdf2 Fix test failures. 2020-08-15 19:33:21 +01:00
Jeff Young b42395ec8d Attempt to fix locale issue with decimal separator in rules. 2020-08-15 17:32:13 +01:00
Jeff Young 6c74658a98 Finish arc implementation of m_ThirdPoint for EDGE_MODULEs.
Fixes https://gitlab.com/kicad/code/kicad/issues/5191
2020-08-15 17:32:13 +01:00
Jeff Young 7342532276 Remove auto. 2020-08-15 17:32:13 +01:00
Jeff Young 4410df50a8 Remove layer check that prevents synthetic layer drawing.
In this particular case it was LAYER_PAD_FR.

Fixes https://gitlab.com/kicad/code/kicad/issues/5190
2020-08-15 17:32:13 +01:00
Jeff Young dbb7859b7c Move Eagle routing layer to Dwgs.User (instead of Edge.Cuts).
Fixes https://gitlab.com/kicad/code/kicad/issues/1899
2020-08-15 17:32:13 +01:00
jean-pierre charras e4021a9ffa Fix some I18n issues.
Strings used for debug and strings containing only a print format like "%i"
are not translated
2020-08-15 17:56:32 +02:00
Mario Luzeiro 78ac675316 3D-Viewer: parameterize raytracing lights, add it to options dialog
Remove some hacks related to postprocessing (not need now because the
previous postprocessing improvements, light parametrization could be
used for tune or future parameters could be implemented)
2020-08-15 09:41:34 +01:00
Seth Hillbrand a0c54951db pcbnew: Clean up group move
SetPosition() only changes the base position of tracks, we need to use
Move() to move the whole element.

This also cleans up white space and group handling in ratsnest

Fixes https://gitlab.com/kicad/code/kicad/issues/5188
2020-08-14 19:47:03 -07:00
Seth Hillbrand 275e810573 eeschema: Use recursive mutex for SCH_PIN
We need to be able to lock individual actions while keeping the code
modular.  The recursive mutex keeps this thread-local.

Fixes https://gitlab.com/kicad/code/kicad/issues/5186
2020-08-14 18:42:11 -07:00
Seth Hillbrand b8b3d5c16d pcbnew: Remove all threading from dynamic ratsnest
The last remaining threaded operation in dynamic ratsnest was the
recalculation of the dynamic connectivity map.  Because we do not
require any of the extra features of the connectivity map, we can get
away with a lightweight move of the anchors to update the ratsnest.  The
resulting connectivity tree is not valid but it is not needed for the
ratsnest, which only needs a list of nets/anchors.
2020-08-14 17:48:33 -07:00
Jeff Young ec5040aff5 Fix missing 'else' and EOF processing, both of which cause crashes. 2020-08-14 22:11:04 +01:00
Jeff Young 94ef2781bf Allow case-insensitive filtering and filter on keystrokes.
Fixes https://gitlab.com/kicad/code/kicad/issues/5177
2020-08-14 22:11:04 +01:00
Peter Montgomery 672224106c Pcbnew: Adjust soldermask dialog panel to scale properly
Added the wxExpand flag to all wxStatic Text widgets to prevent
text from being wrapped awkwardly under Linux (and possibly other
operating systems).

Made sure all sentences ended with a period.

Corrected some spelling mistakes.

Simplified tooltips to read and display better.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/5168

~Also in this commit:
~Rephrased main warning note at top to emphasize get clearance
~settings from your board house.
~Moved two notes at top into tooltips for entry fields
~Removed note that solder mask and paste only apply to copper pads.
2020-08-14 19:51:57 +00:00
Kevin Lannen e54363524c lib_manager: Do not make a copy of the parent symbol to save
The parent symbol needs to be the same pointer as the symbol that is
saved to the cache otherwise the derived symbol will have it's parent
set to a parent that is not in the cache so it will not be saved.

Signed-off-by: Kevin Lannen <kevin.lannen@gmail.com>
2020-08-14 18:37:44 +00:00
Kevin Lannen 13f9478a76 Symbol Editor: Allow changing parent for derived symbol
The symbol editor did not actually update the parent symbol when the
dropdown in the properties editor was changed. This fixes that defect.

Signed-off-by: Kevin Lannen <kevin.lannen@gmail.com>
2020-08-14 18:37:43 +00:00
Tomasz Wlostowski 9cdada9eb4 PCB_EXPR_EVALUATOR: another string fix for wx 3.0 2020-08-14 14:36:27 +02:00
Jeff Young edda024285 Fix up some Coverity and CLion warnings. 2020-08-14 12:41:20 +01:00
Jeff Young 2b0b7a5153 Clear pin net-name-driving cache when changing annotation.
Also update connectivity after clear annotation, annotate or back
annotate.

Also update status bar for highlighted nets.

Fixes https://gitlab.com/kicad/code/kicad/issues/5170
2020-08-14 12:41:20 +01:00
Tomasz Wlostowski 8c94d88c78 qa: fix incorrect cast error on OSX/MSVC 2020-08-14 09:48:40 +02:00
Seth Hillbrand 027b6c8cf9 Account for via width in connectivity
Fixes https://gitlab.com/kicad/code/kicad/issues/5176
2020-08-13 20:31:17 -07:00