Commit Graph

82 Commits

Author SHA1 Message Date
Jeff Young 7ccac79192 More wxString wide literals. 2022-02-05 21:29:34 +00:00
markus-bonk 8e43409d27 Invoke correct base method in PCB_BASE_EDIT_FRAME::handleActivateEvent.
The base class of PCB_BASE_EDIT_FRAME is PCB_BASE_FRAME. Invoking
EDA_DRAW_FRAME::handleActivateEvent in the PCB_BASE_EDIT_FRAME override
will skip the definition in PCB_BASE_FRAME.
2022-01-28 12:21:42 +00:00
jean-pierre charras 05c414c816 Pcbnew: fix rotation angle issue in rotate commands.
The value of this rotation was store in 2 places: the config and the editor frame.
So after changing the rotation angle from the preferences, the value in editor
frames were not updated, and the rotation angle not modified.
Now only the config value is used.
2022-01-20 10:50:26 +01:00
Jeff Young 5176512de3 Move PCBNew rotation increment to EDA_ANGLE. 2022-01-14 16:08:19 +00:00
Jon Evans d3d2ebe349 Do not check key states for non-key events in TryBefore
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10127

(cherry picked from commit 2306d00c89)
2022-01-13 22:31:39 -05:00
Jeff Young e3328e54c4 Fix view switcher on Mac.
Solution for MSW/GTK still isn't great.
2022-01-08 22:23:44 +00:00
Seth Hillbrand 4a16c603e9 Don't bind to Alt+Tab
The Alt key is not usable by programs under Windows and Alt+Tab is
reserved on both MSW and Linux.  Instead, we use the Shift modifier to
determine which preset to open
2022-01-07 15:35:46 -08:00
Jeff Young 5e4a704155 Remove some more duplicated preferences.
Fixes https://gitlab.com/kicad/code/kicad/issues/10112
2021-12-26 13:37:28 +00:00
Jeff Young da11574a19 Remove dead code. 2021-12-24 21:10:28 +00:00
Jeff Young 6c05e5d1a8 Implement user viewports.
ADDED popup to Appearances palette where users can define viewports
for later selection.

Fixes https://gitlab.com/kicad/code/kicad/issues/2271
2021-12-24 17:11:14 +00:00
Jeff Young 9ee28ea8f5 Flatten out some more preferences. 2021-12-24 15:43:20 +00:00
Jon Evans 8026863d4c Use progress reporting in more places when loading a board
Prevents application-not-responding events while opening large designs
2021-11-25 11:19:03 -05:00
Jon Evans 75d75799f7 Move to getters/setters for aux and grid origin
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8836
2021-11-08 22:36:40 -05:00
Jeff Young b84d1456d5 KIFACE_I -> KIFACE_BASE. 2021-09-14 23:45:14 +01:00
Jeff Young 16b0147af8 Prefix DIMENSION types. 2021-06-11 17:59:44 +01:00
Marek Roszko 10e60acf34 Clean up including of board_design_settings.h 2021-06-06 15:03:42 -04:00
Ian McInerney 4f05262705 Cleanup includes in board.h and footprint.h 2021-06-03 20:19:52 +01:00
Jeff Young a4c08e2af6 Apply Eeschema cursor updating architecture to PCBNew.
Fixes https://gitlab.com/kicad/code/kicad/issues/8135
2021-04-12 11:11:11 +01:00
Ian McInerney 29cc16a4c4 Push pcbnew layer alpha change update into base frame
This code was shared between the footprint frame and
pcb edit frame, so push it into the base edit frame.
Also remove the dummy wxUpdateUIEvents that weren't
actually being used.
2021-04-07 17:39:48 +01:00
Jon Evans d0d6352a25 Fix crash launching footprint editor frame
Apparently we get this event before the frame is fully-baked
2021-03-27 23:48:07 -04:00
Ian McInerney f6041fb52d Force update of some text when activation status changes
The text areas aren't always redrawn when the window is activated
or deactivated, so we need to force a refresh of the text to ensure
it is the correct font color.
2021-03-26 15:50:56 +00:00
Jon Evans b314e0828c Don't create project files unconditionally when importing boards
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7368
2021-02-03 19:17:32 -05:00
Jeff Young 6b420b191a Use color theme backgrounds in page previews.
Also includes a *lot* of const fixing to make it happen.

Fixes https://gitlab.com/kicad/code/kicad/issues/6811
2020-12-23 23:18:38 +00:00
Marek Roszko dd0ad8f3a1 Read the fp-info-cache on pcb file load rather than on frame open
Otherwise in standalone mode pcbnew will never load the cache files and also later erase them :/
2020-12-10 21:34:40 -05:00
Marek Roszko 0967995a80 Replace wxTextFile for writing fp info cache
wxTextFile uses wxFile which uses write syscalls which means its unbuffered.
This makes file IO more expensive against network shares where it will flush far too aggressively.
wxTextFile is fine for reads however.
2020-12-10 21:34:40 -05:00
Jeff Young 84dd5108ba Remove some "class_" prefixes from files. 2020-11-13 15:16:23 +00:00
Jeff Young f7333ad64a Update some classnames including archaic zone names. 2020-11-12 10:31:25 +00:00
Michael Kavanagh 3f01c5fae0 Cleanup: move remnants of LAYER_WIDGET to gerbview
These are no longer used in Pcbnew.
2020-11-10 18:55:33 +00:00
Jon Evans e832a94a9c Turn on zone visibility when you start drawing a zone
It's disconcerting to have the zone turn invisible when
you finish drawing and drop the selection.
2020-10-17 15:53:02 -04:00
Mikolaj Wielgus 400c15b8eb Add mils to units, remove useMils variables 2020-10-03 20:06:56 +00:00
Jon Evans 4dda3a1715 Don't allow editing design rules without a project
Also fix a crash initializing DRC engine on an empty board

Fixes https://gitlab.com/kicad/code/kicad/-/issues/5835
2020-09-30 19:12:26 -04:00
Jeff Young 6abe68fff0 Cleanup. No changes to execution. 2020-09-30 23:07:12 +01:00
Jon Evans 7c003f98d5 ADDED: Appearance panel for footprint editor
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5643
2020-09-30 17:46:58 -04:00
Jeff Young 7f33c229d8 Allow selection of nested items (ie: pads) inside an entered group.
Also moves some group-related functionality from BOARD to PCB_GROUP.
2020-09-26 20:35:52 +01:00
Jon Evans b6e4b7bf7d Fix order of initializing tools when loading board
Also add a few safeguards against invalid situations

Fixes https://gitlab.com/kicad/code/kicad/-/issues/5801
2020-09-26 14:45:16 -04:00
Jon Evans 0783669633 CHANGED: Design rules files now use .kicad_dru extension
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5763
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5444
2020-09-24 21:26:23 -04:00
Jeff Young 2b43ffd12d Better error reporting; better nullptr safety.
Also clears the marker lists before running a DRC, and sets
the drcRun flags afterwards so that the notebook tab counts
get updated.

Fixes https://gitlab.com/kicad/code/kicad/issues/5659
2020-09-16 22:14:41 +01:00
Jeff Young e2e229da96 Finish exorcising the old DRC system.
This moves the various BOARD_ITEM calls to the new system, and make
the DRC_ENGINE long-lived so that it can field those queries.
2020-09-15 20:15:46 +01:00
Jon Evans 76c4c959e6 Implement new dimension properties
- Automatic units mode (follow UI units)
- New text and number formatting options
- Automatic/manual text orientation control
- New text positioning options (inline and manual)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/4280
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4497
2020-09-11 21:12:36 -04:00
Mark Roszko 89e74140eb Save file / window states for kicad project locally 2020-08-24 02:01:14 +00:00
Jeff Young 2f0b8eb5e9 Don't allow view preset switcher on non-front window. 2020-08-20 00:51:16 +01:00
Jeff Young 21a9f2ecfe Prevent crash when appearance panel defines no view presets. 2020-08-20 00:48:35 +01:00
Jeff Young 4b7c883095 Add layer presets switcher.
Fixes https://gitlab.com/kicad/code/kicad/issues/5247
2020-08-19 11:56:28 +01:00
Ian McInerney 4491f24d5e Ripout the old SyncToolbars infrastructure reminants
The tool framework no longer needs to request updates of the UI
state for the controls, wxWidgets will do it for us.
2020-08-16 19:10:26 +00: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
Jon Evans 43ab43ec9e Fix a few issues with Close Project
A new empty project needs to be reopened for now
Footprint info cache write only works with a project for now
2020-08-09 11:13:50 -04:00
Jon Evans 32a7d00256 Make sure projects are cleaned up nicely when frames close
PROJECT objects will be deleted by SETTINGS_MANAGER::UnloadProject
so we need to make sure that this is called at an early enough point
in the closing process that anything needed by the PROJECT dtor
is still around.

Also fix an issue where the schematic worksheet was depending on
the project existing after the schematic had been reset.
2020-08-08 16:52:57 -04:00
Jeff Young 7340c97ef9 Undo for schematic-wide operations.
Editing value/footprint fields of multi-unit components.
Find/Change.
Annotation.
Back annotation.

Fixes https://gitlab.com/kicad/code/kicad/issues/2122

Fixes https://gitlab.com/kicad/code/kicad/issues/4869

Fixes https://gitlab.com/kicad/code/kicad/issues/3933

Fixes https://gitlab.com/kicad/code/kicad/issues/4871

Fixes https://gitlab.com/kicad/code/kicad/issues/3899
2020-07-13 12:32:17 +01:00
Jeff Young 7b042f4a75 Add rectangle tool to PCBNew toolbar in favour of Aux Origin.
ADDED new rectangle graphics tool for PCBNew and Footprint Editor.

Also adds rectangle tool to both Footprint Editor and PCBNew Place
menus.

The Aux Origin tool can come back once we have multi-select toobar
buttons.

Also collapses an unnecessary level out of the auxOrigin and gridOrigin
settings.

Fixes https://gitlab.com/kicad/code/kicad/issues/2246
2020-07-01 13:31:30 +01:00