Commit Graph

38 Commits

Author SHA1 Message Date
Jeff Young a207bd97bb Naming conventions. 2020-11-17 16:05:49 +00:00
jean-pierre charras 539ac4c214 Remove a few include<wx/wx.h> in many files that do not actually use this include. 2020-10-19 09:00:50 +02:00
Wayne Stambaugh e91f1f57dd Eeschema: fix rescue multiple unit symbol bug.
The code that checked for pin conflicts to determine if a symbol needed
rescued did not check either the pin convert setting so it was possible
for a pin from the other convert on symbols that do not have identical
units to appear to not have a pin conflict.  Add tests for pin unit and
convert setting to prevent that from breaking the comparison.  This must
have always been broken.

Fix the symbol preview widget to prevent drawing all symbols on top of
each other (if we need to do this the code will have to be revised) and
also show the convert if valid.

Fix broken symbol cache library when saving alias symbols.

Fixes https://gitlab.com/kicad/code/kicad/issues/3879
2020-04-01 20:19:53 -04:00
jean-pierre charras 9d2712a824 Fix a few Coverity warnings.
It also fix:

Fixes #4082
https://gitlab.com/kicad/code/kicad/issues/4082
2020-03-29 18:42:24 +02: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
Wayne Stambaugh 44cb979e91 Decouple SCH_EDIT_FRAME from symbol rescue and remap dialogs.
Do not keep pointer to SCH_EDIT_FRAME in the rescuer object to prevent
it from creating dialogs with itself as the parent when call from the
rescue dialog which is itself a grandchild of the frame window.
2019-02-05 12:43:46 -05:00
jean-pierre charras 88cdce8d62 Make SYMBOL_PREVIEW_WIDGET working, and using the canvas type of the caller. Fix an issue with F3 zoom key in libedit. 2018-10-09 11:08:56 +01:00
Jeff Young 6eafb9a2fd Convert Rescue Symbols dialog previews to GAL. 2018-10-09 11:08:55 +01:00
Jeff Young cb61525394 Handle separate parsing rules for ID_SCH and ID_PCB.
This removes the existing constructors so that all parsing must
be explicit and callers are made aware that they need to think
about illegal characters, malformed ids, etc.

Fixes: lp:1783474
* https://bugs.launchpad.net/kicad/+bug/1783474
2018-07-26 15:43:53 +01:00
jean-pierre charras 8022f1cc01 fix code after renamin files 2018-01-30 11:49:51 +01:00
Chris Pavlina 13bc706518 Fix several dialogs with bad default sizing
- Add helper methods for DPI-independent sizes
- Make splitter sashes visible on macOS
- Remove SetSizeInChars() - wx has a built-in way that I missed
- DIALOG_CHOOSE_COMPONENT: DPI-indep splitter sizes
- DIALOG_RESCUE_EACH: DPI-indep default size and sensible HTML window
  size
- COMPONENT_TREE: DPI-indep sizing
- DIALOG_FP_LIB_TABLE, DIALOG_SYMBOL_LIB_TABLE
2018-01-06 14:39:17 -07:00
Wayne Stambaugh b4e9d9b6f7 Symbol rescue dialog improvements.
Make the user prompt an HTML control for improved layout.

Fix some column title sizing issues.  This is not a complete fix but
it seems better than the default sizing done by wxWidgets.

Use symbol terminology instead of part and/or component.

Create trace string source files for a common place for them and their
Doxygen comments.
2017-11-26 18:14:10 -05:00
Wayne Stambaugh 7e7d3004fb Fix UI string typo in rescue dialog error message. 2017-11-12 11:38:31 -05:00
Wayne Stambaugh c1f7c1778a Revise symbol rescuer to support symbol library table.
Refactor rescue objects so that they can support derivation.

Factor out legacy rescuer code to perform legacy project rescues.

Create new symbol library table rescuer for rescuing symbol library table
based projects.

Perform the correct rescue type on project load.

Add symbol library table remapping support to the tools menu for run on
demand as applicable.

Add flag to SCH_SCREENS::UpdateSymbolLinks() to allow forcing the symbol
link updates when the library modification hash has not changed.
2017-11-09 18:50:20 -05:00
Dick Hollenbeck 4e7de8a761 Reverse commit 4011ed4e31.
This commit was too broad and not cognizant of the purpose of the class
UTF8.

Add MAYBE_VERIFY_UTF8() macro, which can trap non-UTF8 encoded strings in
debug builds.

Use that macro conditionally in class UTF8 to trap non-UTF8 encoded strings
being put into UTF8 instances.
2017-07-26 08:26:56 -04:00
jean-pierre charras 3c3ee9b8c3 Fix a few doxygen warnings 2017-06-26 18:12:57 +02:00
Chris Pavlina feba091594 Highlight the first choice in rescue dialog
Fixes: lp:1455970
* https://bugs.launchpad.net/kicad/+bug/1455970
2017-03-27 08:45:05 -04:00
Chris Pavlina 4011ed4e31 Convert UTF8 to/from wxString correctly around LIB_ID
Fixes: lp:1675942
* https://bugs.launchpad.net/kicad/+bug/1675942
2017-03-24 21:38:00 -04:00
jean-pierre charras 4605cae588 Displays the number of instances to modify in rescue dialog. 2017-03-09 19:16:24 +01:00
Jon Evans a52250a91e Change from EDA_COLOR_T to COLOR4D globally; arbitrary color support
eeschema now supports arbitrary colors for all object types, and
pcbnew does in GAL canvas.  When switching from GAL to legacy canvas,
pcbnew will convert colors to the nearest legacy color.
2017-02-22 17:35:00 +01:00
Chris Pavlina a61be7e00e Move LIB_PART::Draw drawing options into a struct
This makes configuring the options clearer, avoiding the long list of
non-self-explanatory arguments at the small cost of requiring a few more
lines.
2017-02-19 13:40:26 -05:00
Wayne Stambaugh 7ccdca5ced Use library ID to store library symbol information in the schematic symbol.
Use LIB_ID instead of wxString for storing the library symbol information
in the schematic symbol in preparation for the upcoming symbol library table
implementation.

Change the FindLibAlias and FindLibPart functions in the PART_LIBS object
instead of wxString.  Please note that only the library ID name is used to
search the list of libraries.  The library nickname is ignored.  Once the
symbol library table is implemented and full LIB_IDs are defined, the
library search code will no longer be used and will only be kept to load
older schematics that have not been converted.

Move SCH_LEGACY_PLUGIN_CACHE definition so that the legacy plugin knows
how to properly delete the cache object.
2017-02-10 08:36:59 -05:00
Chris Pavlina 9547dd4e52 Fix GetBoundingBox hiding overloaded virtual 2016-09-30 22:32:24 -04:00
Simon Richter 59c81976dc Explicitly mark overriding functions. 2016-09-24 14:53:15 -04:00
Simon Richter 1b2fd6a382 Replace BOOST_FOREACH with C++11 range based for. 2016-06-29 16:07:55 -04:00
Chris Pavlina 0f407a756c Pull existing settings into Doxygen module 2016-05-12 15:45:47 -04:00
Chris Pavlina db8c72cc9d Fix mistake in r6642 / git:bb9f1b0 2016-03-22 21:35:44 -04:00
Chris Pavlina bb9f1b00cd Fix graphics rendering on RTL systems (lp:1559545)
wx mirrors graphics by default on RTL systems; it is necessary to individually
set graphics canvases to LTR mode to avoid this.
2016-03-22 14:53:50 -04:00
Wayne Stambaugh 4007317606 Undo commit -r 6428. 2016-02-15 15:17:51 -05:00
Wayne Stambaugh e8e0a75b8c Eeschema: move update all screen references from SCH_SHEET_PATH to SCH_SHEET.
* Uncouple SCH_COMPONENT::GetRef() from  SCH_SHEET_PATH and use SCH_SHEET
  instead.
* Uncouple SCH_COMPONENT::GetUnitSelection() from  SCH_SHEET_PATH and use
  SCH_SHEET instead.
* Fix all calls to GetRef() and GetUnitSelection() to pass a pointer to the
  appropriate SCH_SHEET object instead of an SCH_SHEET_PATH object.
2016-01-06 19:07:30 -05:00
unknown 15cc245a83 Eesschema, dialog rescue: enhancements:
- Slightly change the info text in the dialog. Add a definition of  exactly what it means to "rescue" a component.
- Reload the project libraries when a project is opened, even if kicad  is already running and the same project is open (to be sure the lib cache is up to date).
- Set the Modified flag on cancel, because a change has indeed been  made (choosing not to rescue is equivalent to updating the components)
2015-06-29 18:31:00 +02:00
Chis Pavlina f3c73f5947 Eeschema: minor component library rescue helper fixes.
* Components with multiple "converts" were rendered with all of them overlapping instead
   of just one.
* Schematics missing a -cache.lib resulted in unnecessary renaming suggestions.
* The dialog title "Conflicts Checking" is inaccurate now (as we're checking for more than
   just conflicts) and also somewhat awkward, unidiomatic GUI English; I renamed it to
   "Project Rescue Helper".
2015-06-26 11:17:23 -04:00
Chris Pavlina 80eb5460f9 Eeschema: component library rescue improvements.
* Fix case sensitive component library name searches
* Factor out rescue code into a generic rescue project class.
2015-06-22 11:38:54 -04:00
Chris Pavlina c7b8f790a7 Eeschema component library rescue changes.
* Show rescued component names in rescue dialog.
* Remove summary dialog.
* Don't create empty rescue library.
2015-05-13 11:09:55 -04:00
unknown 69de718910 lib-cache-rescue coding style fix. lib-cache-rescue set default button OK in dialog. 2015-05-04 09:35:17 +02:00
jean-pierre charras 569c2be354 Minor fixes: dialog rescue: make strings translatable. Remove a few coverity warnings (not initialized members). Very minor other changes. 2015-04-28 17:07:36 +02:00
jean-pierre charras 3b9ebd2270 Minor fixes in dialog rescue: missing title, incorrect refresh due to use of a wxPaintDC outside a paint event, and coverity warnings (not initialized members). 2015-04-27 10:44:17 +02:00
Chris Pavlina 26c320db57 Add schematic component library change rescue feature (fixes lp:1435338).
* Add code to test if any of the components in the schematic cache have been changed
  in the component libraries.
* Prompt user to accept or reject components when changes are found.
* If the user chooses to use the components in the cache, create a new library with the old
  components and add it to the beginning of the component library list so the schematic will
  not be changed.
* Create dialogs to handle user feedback and status.
2015-04-25 18:26:51 -04:00