Commit Graph

69 Commits

Author SHA1 Message Date
John Beard 8181646794 Fix -Wshadow warning in sch_sheet_path.cpp
Three instances of variables named "reference" shadow a typedef
within std::vector producing:

warning: declaration of ‘reference’ shadows a previous local [-Wshadow]
 note: shadowed declaration is here
           typedef typename _Alloc_traits::reference  reference;

This patch works around by renaming "reference" to "schReference".
2018-06-28 10:04:43 -04:00
Jeff Young 447fd1bf02 Add a start number to annotate.
This also makes the dialog modeless so that one switch between
sheets while annotating to choose the base numbers for each
sheet (assuming they don't like the base number we pick because
of the order of the sheets).

Fixes: lp:1154131
* https://bugs.launchpad.net/kicad/+bug/1154131
2018-02-19 09:32:54 -05:00
jean-pierre charras 795a36c9fe Fix code after renaming files, and a bit of code cleanup (remove useless includes and multiple includes of the same files) 2018-01-30 09:57:25 +01:00
Camille 9ff66a5274 Fix unnecessary value parameter detected by clang-tidy. - Replace value parameter by const reference parameter or move-assignement in some cases 2018-01-09 18:55:51 -05:00
jean-pierre charras 656d4d0dff dialog_edit_components_libid: shows orphan components (components with no symbol found in library) 2017-11-21 18:06:37 +01:00
Wayne Stambaugh 36f6d4a1f4 Convert symbol library editor over to use symbol library table.
Simplify some of the library editing code.  There have been a few minor
changes in the behavior of the editor.  If the current symbol is deleted
from the library, the next symbol in the library is not loaded.  The
deleted symbol is cleared and the current symbol is empty.

Change component to symbol to align with the preferred terminology
discussed on the developer's mailing list.

Add separate update UI event for save library as to enable the menu entry
whenever a library is selected.

Change the select symbol list dialog to a single column using the LIB_ID
format LIB_NICKNAME:LIB_ITEM_NAME so that the selection can be parsed by
LIB_ID.

Add method to expand URI to LIB_TABLE_BASE.

Override wxApp::OnExceptionInMainLoop() in debug builds to make debugging
easier when an unhandled exception occurs in a wxUpdateUIEvent handler.

Change SCH_SCREENS::HasNoFullyDefinedLibIds() to return false when the
schematic has no symbols to prevent the remapping dialog from being run.

Use SCH_COMPONENT part reference when creating netlist rather than looking
up the library symbol.
2017-11-09 18:50:20 -05:00
jean-pierre charras 58c32367ee filter useless autosave tests, and optimization of autosave test in Eechema 2017-07-26 18:06:04 +02:00
jean-pierre charras f042fcddd0 Change the way power symbols are annotated before creating a netlist or running ERC.
Now only not annotated symbols (or duplicate references) are modified.
2017-07-21 18:41:04 +02:00
jean-pierre charras 02abf18046 Eeschema: speed up netlist creation. 2017-04-12 08:18:46 +02: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
Simon Richter 1b2fd6a382 Replace BOOST_FOREACH with C++11 range based for. 2016-06-29 16:07:55 -04:00
Dick Hollenbeck e47f0df068 Cleanups
* coding standard fixes
* library part not library component (no such thing as a library component)
* string concatenation fix
* and an inline harmless debug/dump function
2016-06-24 12:55:54 +02:00
Wayne Stambaugh 92f5ab8589 Eeschema: SCH_SHEET_LIST improvements.
* Derive SCH_SHEET_LIST from std::vector rather than using internal array
  management.  Change all internal code to use iterators or array operator
  in loops.
* Allow creation of empty SCH_SHEET_LIST for external population for plotting
  and printing.
* Clean up print an plot code to take advantage of new SCH_SHEET_LIST behavior.
* Make BuildSheetList() public so list can be populated after creation.
* Update all instances of SCH_SHEET_LIST with the appropriate SCH_SHEET
  object on initialization.
* Create const and non-const version of SCH_SHEET_PATH::GetSheet().
2016-03-06 16:22:01 -05:00
Wayne Stambaugh b7e56ae1cb Eeschema: SCH_SHEET_PATH refactor.
* Derive SCH_SHEET_PATH from std::vector< SCH_SHEET* > and remove unnecessary
  assignment operator and list management functions.
* Remove function BuildSheetPathInfoFromSheetPathValue() since it was
  effectively an assignment operation.
* Replace all calls to BuildSheetPathInfoFromSheetPathValue() with assignment
  operator.
* Replace list management functions with vector management functions.
* Fix a error message that wasn't translatable.
2016-02-27 14:35:45 -05:00
Wayne Stambaugh af2e19d7d9 Undo commit -r 6380. 2016-02-15 15:21:18 -05:00
Wayne Stambaugh 3d963166c7 Undo commit -r 6389. 2016-02-15 15:19:22 -05:00
Wayne Stambaugh 73dc53dc35 Undo commit -r 6413. 2016-02-15 15:18:32 -05:00
Wayne Stambaugh 4007317606 Undo commit -r 6428. 2016-02-15 15:17:51 -05:00
Wayne Stambaugh 1866b61a56 Undo commit -r 6457. 2016-02-15 15:16:54 -05:00
Wayne Stambaugh 27b587025d Undo commit -r 6506. 2016-02-15 15:14:48 -05:00
Wayne Stambaugh 5a5fffb349 Undo commit -r6509. 2016-02-15 15:14:07 -05:00
Wayne Stambaugh 7b5823185a Undo commit -r 6535. 2016-02-15 15:12:42 -05:00
Wayne Stambaugh 9eda45a97e Undo commit -r 6539 2016-02-15 15:11:50 -05:00
Wayne Stambaugh cb13e57973 Eeschema: move find sheet by name from SCH_SHEET_PATH to SCH_SHEET.
* Move FindSheetByName() function from SCH_SHEEET_PATH to SCH_SHEET object
  and update calls to FindSheetByName() accordingly.
* Remove SCH_SHEET_PATH::FindSheet() which was unused.
* Add sorting option to SCH_SHEET::GetSheets().
2016-02-05 08:33:28 -05:00
Wayne Stambaugh 0ef1eee2c6 Eeschema: move recursion check from SCH_SHEET_PATH to SCH_SHEET.
* Add const and non-const version of GetRootSheet() to SCH_SHEET.
* Add GetSheetPaths() function to SCH_SHEET which behaves the same way
  as SCH_SHEET_LIST except it uses standard C++ containers and is a much
  simpler design.
2016-02-02 19:45:43 -05:00
Wayne Stambaugh 2aac71700b Eeschema: move is complex hierarchy and find next item from SCH_SHEET_PATH to SCH_SHEET.
* Add function to get a list pointers to this sheet and all of it's  sub-sheets
  to SCH_SHEET.
* Remove unused function SetFootprintField() from SCH_SHEET_PATH.
2016-01-24 15:46:14 -05:00
Wayne Stambaugh ac30be332f Eeschema: move get multi-unit components from SCH_SHEET_PATH to SCH_SHEET. 2016-01-21 19:01:34 -05:00
Wayne Stambaugh cdba425bad Eeschema: move get components from SCH_SHEET_PATH to SCH_SHEET.
* Add sheet number that is set by schematic file load order.  This duplicates
  the previous SCH_SHEET_PATH behavior.
* Uncouple SCH_REFERENCE and SCH_REFERENCE_LIST from SCH_SHEET_PATH.
* Add - operator to SCH_SHEET for comparison purposes.  This duplicates the
  behavior of SCH_SHEET_PATH::Cmp().
2016-01-12 21:31:34 -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
Wayne Stambaugh 133b8f6b96 Eeschema: move annotate power symbols from SCH_SHEET_PATH to SCH_SHEET.
1
* Uncouple SCH_COMPONENT::SetRef() from  SCH_SHEET_PATH and use SCH_SHEET  instead.
2016-01-03 08:58:27 -05:00
jean-pierre charras 9d994663f1 Fix Bug #1527446 (Flipping a block in pcbnew doesn't flip inner layers nor their connected microvias).
Also fix a few typos and remove dead code.
2015-12-27 16:51:13 +01:00
jean-pierre charras c4ea4dc0df Fix some warnings (looking like potential bugs) detected by cppcheck, (a few from a patch from Julien Nabet <serval2412@yahoo.fr>), remove not used vars and a few coding style fixes. 2015-12-27 13:16:46 +01:00
Wayne Stambaugh 81e6af6c81 Eeschema: move auto-save test from SCH_SHEET_PATH to SCH_SHEET. 2015-12-20 15:58:18 -05:00
Wayne Stambaugh 1bd860d1aa Eeschema: move modification state code from SCH_SHEET_LIST to SCH_SHEET. 2015-12-16 19:27:53 -05:00
Mark Roszko 33419ee4bf Eeschema: remove unused headers, unused variables, redundant casts, and minor boolean tweaks. 2015-11-03 14:44:05 -05:00
Chris Pavlina 859435cabe Fix clang build error due to ambiguous function GetSheet() in SCH_SHEET_PATH. 2015-06-08 10:37:45 -04:00
Wayne Stambaugh 54bad8b5e8 Fix Eeschema sheet recursion bugs.
* Add code to test for sheet path recursion to SCH_SHEET_PATH and SCH_SHEET_LIST.
* Add recursion tests to edit sheet code in Eeschema.
* Add recursion tests to block paste code in Eeschema.
2015-06-07 16:31:55 -04:00
Wayne Stambaugh ad9ec412f5 UI consistency and assertion fixes.
* Use "Close" in the file menu of every main frame window instead of the
  mismatch of the terms "Close", "Exit", and "Quit".
* Change the terminology in the Pcbnew graphic text edit dialog to match the
  module text edit dialog.
* Improve the layout of the Pcbnew graphic text dialog.
* Fix some wxPrintf parameter type assertions for 64 bit time_t.
* Fix all (at least I think I got all of them) duplicate menu accelerator
  characters.
2015-04-23 15:43:45 -04:00
unknown 74154480de Eeschema enhancements: Option to annotate keeping multi-unit parts grouped and friendlier warning for modifying power values. 2015-03-23 12:45:31 +01:00
Mark Roszko 3918d3f0b2 Eeschema code cleanup and coverity fixes. 2015-02-21 09:11:58 +01:00
Wayne Stambaugh a27845e948 Fix MinGW 64 bit build buigs.
* Patch Boost interlocked.hpp from version 1.56.
* Fix segfault in Eeschema when auto save event occurs before root sheet is initialized.
* Add assertion when SCH_SHEET_PATH::BuildSheetList is called with NULL pointer.
2014-08-23 11:22:50 -04:00
Dick Hollenbeck 7e483f69bd Modular KiCad Blueprint Milestone B), major portions:
*) When kicad.exe closes a project, close any open KIFACEs so that they cannot
     get disassociated from their true PROJECT.
  *) Allow loading eeschema library editor from kicad.exe
  *) Allow loading pcbnew library editor from kicad.exe
  *) Rename LIB_COMPONENT to LIB_PART.
  *) Add class PART_LIBS, and PART_LIB.
  *) Make PART_LIBS non-global, i.e. PROJECT specific.
  *) Implement "data on demand" for PART_LIBS
  *) Implement "data on demand" for schematic SEARCH_STACK.
  *) Use RSTRINGs to retain eeschema editor's notion of last library and part being edited.
  *) Get rid of library search on every SCH_COMPONENT::Draw() call, instead use
     a weak pointer.
  *) Remove all chdir() calls so projects don't need to be CWD.
  *) Romove APPEND support from OpenProjectFiles().
  *) Make OpenProjectFiles() robust, even for creating new projects.
  *) Load EESCHEMA colors in the KIWAY::OnKiwayStart() rather in window open,
     and save them in the .eeschema config file, not in the project file.
  *) Fix bug with wxDir() while accessing protected dirs in kicad.exe
  *) Consolidate template copying into PROJECT class, not in kicad.exe source.
  *) Generally untangle eeschema, making its libraries not global but rather
     held in the PROJECT.
2014-08-13 15:28:54 -05:00
Lorenzo Marcantonio 7b4b3297db - Better way to iterate on vias in the track list (GetFirstVia)
- Converted the Next/Prev C casts to static casts and removed the type
  unsafe ones
- Splitted as virtual the VIA::Flip member instead of using RTTI
- Heavily refactored the 'unconnected track' cleanup routine
- Misc constification
2014-04-30 21:16:22 +02:00
Wayne Stambaugh f0b2565f12 Eeschema find/replace bug fixes and improvements (fixes 1208616).
* Fix replace bug to handle case sensitivity properly.
* Fix replace bug where the item index was getting updated incorrectly.
* Fix replace infinite loop bug on replace all.
* Make find/replace view update code a separate function.
* Rearrange find/replace trace string to add tracing to EDA_ITEM::Replace().
* Add IsComplexHierarchy method to SCH_SHEET_LIST for future find/replace
  improvements.
2013-10-27 14:21:53 -04:00
jean-pierre charras 28d702f6a9 Eeschema: fix a *very subtle* bug noticeable only in complex hierachies, for multiple parts per package:
sometimes, the modified flag was set for these components just when switching from a sheet to an other sheet.
Pcbnew: fix Bug #1197414 (dragged track segments does not show clearance area)
2013-07-05 19:48:01 +02:00
Wayne Stambaugh 7d0ec1a138 More encapsulation work.
* Complete encapsulation of the MODULE class.
* Complete encapsulation of the EDA_TEXT class.
* Encapsulate most of the ZONE_CONTAINER class.
* Add pcbcommon library as a dependency for reSWIGging the scripting
  support.  This should cover most dependency cases.
2013-03-18 15:36:07 -04:00
Dick Hollenbeck b8a0ab4c52 switch to <> for includes from "" per conversation with Jean-Pierre and Wayne, adjust search paths 2012-01-22 22:33:36 -06:00
Dick Hollenbeck b979d1e0b9 plugin work, accessors 2011-12-12 02:37:05 -06:00
Wayne Stambaugh d8ad2cceb0 Encapsulate LIB_PIN class and begin encapsulating SCH_EDIT_FRAME class. 2011-12-08 16:05:43 -05:00
Wayne Stambaugh 1047e60e35 Encapsulate SCH_POLYLINE, SCH_SHEET, and SCH_TEXT classes. 2011-12-08 10:45:01 -05:00