Commit Graph

940 Commits

Author SHA1 Message Date
Jeff Young e5c051b403 Rewrite CVPCB copy/paste to not need to know about menu vs keyboard.
Fixes https://gitlab.com/kicad/code/kicad/issues/6602
2021-02-05 18:25:34 +00:00
Roberto Fernandez Bautista 9aedeae5c3 Don't log error messages when using the clipboard
wxClipboard::GetData()and wxClipboard::SetData() both log a "wxLogSysError" error-level message (see for example:  https://github.com/wxWidgets/wxWidgets/blob/v3.1.4/src/msw/clipbrd.cpp#L703 ). This logged message gets displayed as a messagebox to the user.

The logging can be disabled temporarily by creating a wxLogNull object. See https://docs.wxwidgets.org/3.0/classwx_log_null.html

Fixes https://gitlab.com/kicad/code/kicad/-/issues/6956
2021-02-03 01:55:05 +00:00
Wayne Stambaugh 4619d5e112 Fix more broken Doxygen comment specifiers. 2021-01-26 12:17:52 -05:00
Seth Hillbrand 8de9cff4e0 Change environmental variables to human-readable
Versions specific variables that may point to objects that change
through versions, allowing multiple KiCad versions to operate correctly
(even on MSW) on the same machine.
2021-01-01 16:20:35 +00:00
Michael Kavanagh 7081f6d715 Icons: Remove unused sources
mw_toolbar button has been replaced by toolbar palettes
auto_associe replaced by auto_associate in new set
2020-12-24 01:02:02 +00: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
Jeff Young 47ea51ec34 Allow both aui-manager-based infobars and window overlay infobars. 2020-12-22 21:36:39 +00:00
Jeff Young 1c0d4ac02d Simplify some error messages. 2020-12-18 00:30:26 +00:00
Jeff Young bb232e6ac6 Unify LIB_IDs now that both are stored in sexpr files.
Fixes https://gitlab.com/kicad/code/kicad/issues/6764
2020-12-18 00:30:26 +00:00
Jeff Young 5b22cef984 Associate -> assign in the context of footprint assignments.
Fixes https://gitlab.com/kicad/code/kicad/issues/6708
2020-12-13 13:41:25 +00:00
Jeff Young 73b7b104cd Fix some issues with Infobar sizing.
This also commits to the new strategy as it wasn't really compatible
with if-def-ing anymore.
2020-12-11 12:39:40 +00:00
Jeff Young 7f8faffa3a Trim down ever-expanding context menu. 2020-12-01 14:04:01 +00:00
Jeff Young 9c7c05c161 Mostly formatting cleanup but a few type-casting cleanups too. 2020-11-24 22:16:41 +00:00
Jeff Young a207bd97bb Naming conventions. 2020-11-17 16:05:49 +00:00
Wayne Stambaugh c7926db553 More minor dialog layout improvements. 2020-11-16 07:29:07 -05:00
Jeff Young d094f86b1a Finish module cleanup (except for xpms). 2020-11-14 22:00:12 +00:00
Jeff Young bdbb68f813 MODULE -> FOOTPRINT. 2020-11-13 16:04:03 +00:00
Jeff Young 84dd5108ba Remove some "class_" prefixes from files. 2020-11-13 15:16:23 +00:00
Jeff Young 4dc877d0e9 Module -> Footprint. 2020-11-08 21:43:19 +00:00
Jeff Young bfd8a62852 Formatting and naming conventions. 2020-11-07 18:50:30 +00:00
Ian McInerney 3d47eb0d49 Fix localization of the menu strings with accelerator strings
The accelerator strings really shouldn't be part of the translation,
and some translations have cause the accelerator keys to be incorrectly
handled. It is simpler to make it separate and just join them to the
translated string.

Make all accelerator modifiers use lowercased Ctrl instead of CTRL
to be the same as the other modifiers.

Fixes https://gitlab.com/kicad/code/kicad/issues/5992
2020-11-04 01:31:52 +00:00
Seth Hillbrand 9ed6cdd943 Remove GITHUB plugins
KiCad github downloads are no longer supported

Fixes https://gitlab.com/kicad/code/kicad/issues/6182
2020-10-29 16:45:04 -07:00
Ian McInerney 6bd3b0afa4 Various Coverity fixes 2020-10-27 00:25:08 +00:00
Marek Roszko 14c18b7e64 Move ui functions out of common and into ui_common 2020-10-25 20:01:12 -04:00
Marek Roszko e49ac45b84 HTML_MESSAGE_BOX is a dialog 2020-10-25 20:01:12 -04:00
Marek Roszko a785f70ea1 msgpanel is a widget, shove it to the right folder. 2020-10-25 20:01:12 -04:00
Seth Hillbrand f8a4edb1c9 First pass renaming module to footprint
This is mostly in comments and the few remainin text strings that
reference module
2020-10-20 20:49:11 -07:00
Seth Hillbrand 661e85d705 Standardize "Key words" to "Keywords" 2020-10-20 13:18:48 -07:00
Marek Roszko a1c75748a0 Remove GetChars(), a wxWidgets 2.9 compatibility hack 2020-10-15 20:53:25 -04:00
Jeff Young 90da5fccbd Disambiguate backannotation (Update Schematic from PCB) from Cvpcb. 2020-10-14 21:07:10 +01:00
Mark Roszko a8bd0a9b84 Handle Windows manifests ourselves and add dpi awareness option 2020-10-10 19:08:23 +00:00
Jeff Young 0c75a09bde Remember pane widths in CvPcb.
Fixes https://gitlab.com/kicad/code/kicad/issues/5708
2020-10-09 21:30:09 +01:00
Mark Roszko d9485129c8 Implement more context specific cursors using both stock and custom cursors. 2020-10-08 00:50:28 +00:00
Ian McInerney 43c14face0 Switch to showing metric/imperial units in comboboxes and menus
This will always show 1 unit from each system, with the primary unit
being the current frame unit and the secondary unit being the
most recent unit used from the other system. These are saved in
the settings, so they are saved between runs.
2020-10-05 20:26:33 +01:00
Ian McInerney b1bd1f2a97 Introduce new action to switch to mils as a unit 2020-10-04 17:53:55 +01:00
jean-pierre charras 87a220b8e2 more cleanup about removing useless include 2020-10-02 14:51:11 +02:00
Ian McInerney 78c43158f4 Annotate the board class with if it is for a footprint edit/view 2020-09-30 23:34:04 +01:00
Ian McInerney fc565edb33 Add a palette to the toolbars to display groups of actions
This adds a palette to toolbar items that displays groups
of actions when long-pressed on a button.
2020-09-27 01:00:44 +01:00
Seth Hillbrand e840ac1c0c Adding pledit and cvpcb zoom to fit 2020-09-22 23:21:44 +00:00
Seth Hillbrand 173b4ff588 Add snapping to eeschema
This generalizes both the SetPosition() function and ORIGIN_VIEWITEM
class away from the pcbnew-centric.
2020-09-09 10:18:15 -07:00
Roberto Fernandez Bautista 3b3af5327f CADSTAR PCB Archive Importer: Move code into common/plugins and pcbnew/plugins folders 2020-09-08 21:21:20 +00:00
Roberto Fernandez Bautista 86bf592bac ADDED: CADSTAR PCB Archive Importer
Initial commit
- Imports directly mappable layer stackup (only physical board fabrication layers for now)
2020-09-08 21:21:20 +00:00
Jeff Young 06ccef3dd4 Update all instances in CvPcb when one is changed. 2020-09-06 17:15:26 +01:00
Jeff Young 7b05e456cc Bug fixes for multiple symbol instances in complex hierarchies
1) use SCH_COMPONENT::GetRef(), GetValue() and GetFootprint() when
instance-specific info is needed
2) update UpdateAllScreenReferences() to handle value and footprint.
3) BACKANNO is CvPcb's handler, not back annotation's handler.  Which
means it needs GUI behaviour, not back annotation behaviour.

Fixes https://gitlab.com/kicad/code/kicad/issues/5520
2020-09-06 13:57:14 +01:00
Ian McInerney f28b60896c Allow toolbar items to cancel tools when pressed
There was a regression in v6 where the zoom to selection toolbar
item wasn't canceling the tool when pressed and the tool was active
(it was in v5). This implements a more generic framework for canceling
tools on button presses.

Fixes https://gitlab.com/kicad/code/kicad/issues/5103
2020-09-05 01:49:38 +01:00
Mark Roszko 9f128f942c Move shutdown blocker to kiplatform 2020-09-01 10:14:51 +00:00
Jeff Young 2697fc3864 Remove canvas-switching from OSX.
The Cairo renderer doesn't work on Retina displays.

Fixes https://gitlab.com/kicad/code/kicad/issues/4788
2020-08-31 18:48:25 +01:00
Mark Roszko 1082402b33 Convert UNDO_REDO_T to an enum class 2020-08-26 18:04:32 +00:00
Mark Roszko 89e74140eb Save file / window states for kicad project locally 2020-08-24 02:01:14 +00:00
Thomas Pointhuber a03fb7a9a8 Altium: Refactor and add initial structure for schematic importer
altium: move pcbnew/altium2kicadpcb_plugin -> pcbnew/plugins/altium

See: https://gitlab.com/kicad/code/kicad/-/issues/4412
2020-08-23 19:01:08 +00:00
Wayne Stambaugh ede39780e2 Remove all debugging output that cannot be disabled.
The use of printf, wxLogDebug, and std::err/std::out causes excessive
debugging output which makes finding specific debugging messages more
difficult than it needs to be.

There is still some debugging output in test code that really needs to
be moved into a unit test.

Add debugging output section to the coding policy regarding debugging
output.
2020-08-18 10:17:36 -04: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
Ian McInerney e8b11c911e Migrate Pcbnew/footprint viewer/footprint editor to the new UI update system 2020-08-16 19:10:26 +00:00
Ian McInerney fd4388710d Migrate eeschema, libview and libedit to the UI condition framework
Also, fix some issues in other frames identified along the way.
2020-08-16 19:10:25 +00:00
Ian McInerney 45fb030b9b Rename and shorten the names in ACTION_CONDITIONS 2020-08-16 19:10:25 +00:00
Ian McInerney 3b05d7cddd Move more frames to the new UI condition framework
* Frames moved: cvpcb, cvpcb footprints frame, gerbview, pagelayout editor

This also introduces new EDITOR_CONDITIONS that are used to set the
conditions of very common editor settings.

Also, some IDs were converted to tools in the pagelayout editor.
2020-08-16 19:10:25 +00:00
Ian McInerney 4c535c160c Set the about program name for cvpcb 2020-08-16 12:37:51 +01:00
Ian McInerney 5c7a43b939 Remove unused CMake from cvpcb 2020-07-31 18:23:46 +01:00
Seth Hillbrand e19a7910f8 Revert "Revert "Set DoubleBuffering to reduce flicker""
This reverts commit c18cab6154.
2020-07-13 20:19:10 -07: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
Seth Hillbrand c18cab6154 Revert "Set DoubleBuffering to reduce flicker"
This reverts commit 106259f6e6.

In its place, we set double buffering to only menubars in an attempt to
find a soluton to #4785

Fixes https://gitlab.com/kicad/code/kicad/issues/4863
2020-07-11 09:43:30 -07:00
Jeff Young 9806d846b2 Remove redundant Text Filter toggle icon and fix <Enter>.
(Enter in the filter textbox should execute the search, not close
the dialog.)

Fixes https://gitlab.com/kicad/code/kicad/issues/4768
2020-07-09 16:22:59 +01:00
Jon Evans c0aa6965de Migrate PcbNew project settings to new framework
Various architecture upgrades to support this.
Creating a BOARD now requires a valid PROJECT, which caused
some (mostly transparent) changes to the Python API internals.

ADDED: Project local settings file
CHANGED: Board design settings are no longer stored in PCB file
CHANGED: Net classes are no longer stored in PCB file
CHANGED: Importing board settings now reads boards, not just projects

Fixes https://gitlab.com/kicad/code/kicad/-/issues/2578
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4070
2020-07-02 22:08:54 -04:00
Jon Evans 0e2f9cb1bd Migrate CvPcb project parameters 2020-07-02 22:08:54 -04:00
Ian McInerney fb10406e67 Add right-click context menus for toolbar items 2020-06-26 21:29:03 +00:00
Ian McInerney 52856a8ce4 Move scaled toolbar separator into ACTION_TOOLBAR
* Ensure all separators are scaled separators
* Clean up toolbar creation functions
2020-06-26 21:29:03 +00:00
Jeff Young ad12c42e8b Push grid settings dialogs down into common.
This also gives support for fast grid switching and a user grid
to eeschema.

Fixes https://gitlab.com/kicad/code/kicad/issues/2200
2020-06-14 19:26:37 +01:00
Jeff Young c48f4272f3 Collapse a level out of the zoom settings.
The APP_SETTINGS_BASE now holds the list of zoom factors, and
the old legacy (screen-based) code has been removed.
2020-06-13 22:44:16 +01:00
Jeff Young f84406009b Push a couple of layers of indirection out of grid settings. 2020-06-13 11:35:56 +01:00
Ian McInerney 9d0ea66a96 Don't use the accelerator table in the menubars
It seems that the accelerator table causes issues with
keyboard events on MSW.

Fixes https://gitlab.com/kicad/code/kicad/issues/1941
2020-06-06 22:50:35 +00:00
Ian McInerney 4357c1d3b3 Coverity and compiler warning fixes
* Initialize variables
* Test dynamic casts

Fixes https://gitlab.com/kicad/code/kicad/issues/4620
2020-06-05 12:50:56 +01:00
Ian McInerney bcd5d7f22e Fix include path 2020-06-04 22:54:03 +01:00
Jeff Young 0ddf53397f Make sure CvPcb gets its Cancel button fixed up.
It's no longer a DIALOG_SHIM so it can't depend on its fixup.

Fixes https://gitlab.com/kicad/code/kicad/issues/4611
2020-06-04 22:35:01 +01:00
Ian McInerney a074b32615 Move cvpcb DISPLAY_FOOTPRINTS_FRAME loading error handling to a reporter 2020-06-04 00:35:19 +01:00
Jeff Young fa2f396a7c Cleanup. 2020-06-02 21:49:44 +01:00
Jeff Young d99febba6c Treat sketch mode module items and board items the same. 2020-05-26 23:21:38 +01:00
Jon Evans 28a4813c71 Force footprint viewers to have a cursor
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4528
2020-05-24 16:10:37 -04:00
Jon Evans a52435bbb0 ADDED: New mouse settings panel, expanded mouse settings
You can now choose the behavior of dragging with the
middle and right mouse buttons.

You can also choose which modifier keys to use for
panning and zooming with the scroll wheel or trackpad.

You can also customize the zoom speed, which makes
it possible to have a good zoom experience on a wider
range of input devices.

You can also now zoom by dragging with the right or
middle button if desired.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/3885
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4348
2020-05-24 14:38:28 -04:00
Ian McInerney d3db3b7cc9 Give the cvpcb fpviewer frame an infobar and use it for errors
Using the infobar for errors doesn't steal focus from the cpvcb
main window when they are displayed like a dialog does, so it
allows for them to be visible without interrupting navigation
in the listboxes.
2020-05-24 11:58:33 +01:00
Ian McInerney 4ecf99e7c8 Give the footprint viewer a toolbar and remove the options dialog
CHANGED: Cvpcb fpviewer and the pcbnew fpviewer no longer have an options dialog
ADDED: Add a side toolbar to the pcbnew footprint viewer (and the measure tool)

This also cleans up some of the settings structs in the viewers, since
it was somewhat confusing before.

Fixes https://gitlab.com/kicad/code/kicad/issues/2205
2020-05-24 11:58:33 +01:00
Ian McInerney 6692935808 Consolidate common viewer actions across cvpcb and pcbnew frames
* Consolidate the measure tool into one tool (this gives cvpcb
  unit changing and snapping capabilities in its measure tool)
* Transition cvpcb to use actions for the sketch modes
* Replumb how magnetic items settings are stored and used
2020-05-24 11:58:33 +01:00
Jon Evans f2e003147e ADDED: Enable color themes for PcbNew printing 2020-05-16 13:19:43 -04:00
Jon Evans 960ce4aa67 Use footprint color scheme for CvPcb footprint viewer panel
Fixes #4375
2020-05-08 17:05:29 -04:00
Ian McInerney e4b6487fca Overhaul compiler warnings infrastructure
* Track our warnings separate from normal flags
* Remove all warnings from the SWIG code
* Add more GCC warnings
2020-05-06 01:47:20 +01:00
Ian McInerney d006acecf4 More window sizing fixes
* Push all sizing operations into EDA_BASE_FRAME
* Save the unmaximized window size when maximizing
  so that we can then save it in the config if the
  window is maximized. Otherwise the config ends up
  with the maximized size saved, and weird behavior
  occurs when unmaximizing on the next opening.
2020-04-27 00:14:12 +01:00
Jeff Young 1535c83b88 Lay some groundwork for adding distances to DRC errors.
modified:   eeschema/lib_rectangle.cpp
2020-04-24 14:46:22 +01:00
Jeff Young 7f1b409305 Remove dead legacy print code. 2020-04-20 17:03:38 +01:00
Ian McInerney 7bda8178d1 Move library includes to main CMake file
Placing them behind the SYSTEM directive tells CMake to tell
the compiler they are system libraries, so it shouldn't show
warnings created from them.
2020-04-19 01:11:56 +01:00
Thomas Pointhuber b707c84b62 Use Record handling for parsing
Now, we know how big a record is, and should be able to parse all boards without missing bytes?
2020-04-03 23:22:24 +00:00
jean-pierre charras 6e47f147aa A few Coverity fixes. 2020-03-30 09:50:26 +02:00
Jeff Young d30fb79706 Fix mismatch in tool name and activation action.
Fixes https://gitlab.com/kicad/code/kicad/issues/4110
2020-03-29 13:27:18 +01:00
Jeff Young d69ebfae49 Push tool framework base down into TOOL_HOLDER.
This allows us to use it outside of EDA_BASE_FRAMEs (in this case, in
PANEL_PREVIEW_3D.)
2020-03-24 19:00:25 +00:00
jean-pierre charras cc47062b17 Fix a few Coverity issues 2020-03-23 16:17:22 +01:00
Kevin Zheng af514cac44 Ask to save changes even after pressing "Cancel"
When pressing "Cancel" in Cvpcb's Footprint Assignment window, Cvpcb
discards changes without prompting the user. The comment suggests that
this behavior is intentional.

I have personally lost work due to this behavior when I tried to click
"Ok" and missed. Discarding changes without a prompt seems like a bad
idea anyway, so this stop doing that.

The only disadvantage is that it is now harder to open and close the
Footprint Assignment window without saving changes.
2020-02-27 17:05:15 +00:00
Jeff Young 383403ef98 Push deprecation warning suppression down into boost.
Note: requires boost 1.67 or later.
Current boost version is 1.72.
2020-02-21 17:36:12 +00:00
Jeff Young e1d59337d1 Protect GCC #pragmas. 2020-02-20 22:20:44 +00:00
Jeff Young 129042f8a6 Convert timestamps to UUIDs. 2020-02-20 21:29:52 +00:00
jean-pierre charras 59517ac24d Cvpcb: fix incorrect display of a bold text inside the main toolbar. 2020-02-20 12:48:23 +01:00
Jon Evans e59a3d981e Implement a new settings framework across all of KiCad
CHANGED: Settings are now stored in versioned sub-directories
ADDED: First-run dialog for migrating settings from a previous version
CHANGED: Settings are now stored as JSON files instead of wxConfig-style INI files
CHANGED: Color settings are now all stored in a separate settings file
CHANGED: The symbol editor and footprint editor now have their own settings files
CHANGED: Color settings are no longer exposed through BOARD object
CHANGED: Page layout editor now uses Eeschema's color scheme

Settings are now managed through a central SETTINGS_MANAGER held by PGM_BASE.
Existing settings will be migrated from the wxConfig format on first run of each application.
Per-application settings are now stored in one class for each application.
2020-02-19 23:44:56 -05:00
Ian McInerney b1240b5b1e Gracefully shutdown tools when frames are closed
If the tools are not gracefully exited, then the stack variables are
never destroyed, so variable lifetime issues can occur.

Fixes https://gitlab.com/kicad/code/kicad/issues/1753
2020-02-05 22:23:24 +00:00