Commit Graph

2721 Commits

Author SHA1 Message Date
Maciej Suminski f667f54c52 Moved component tree widget to a separate class 2017-06-19 14:48:53 +02:00
jean-pierre charras dfc49da29b Fix issues in strings that need to be translated (non ASCII7 strings, trailing spaces...) 2017-06-18 21:35:37 +02:00
jean-pierre charras 1466d0cee6 Fix a few doxygen warnings 2017-06-18 09:18:41 +02:00
Maciej Suminski 2018d48946 Fixed removal order in SIM_PLOT_PANEL::DeleteTrace() 2017-06-16 23:17:34 +02:00
Wayne Stambaugh dab73e172b Doxygen warning fixes and coding policy comment changes. 2017-06-16 10:08:28 -04:00
jean-pierre charras 996bcdf458 Fix a few doxygen warnings 2017-06-16 09:18:31 +02:00
Wayne Stambaugh 66e97fa905 Doxygen comment improvements.
Fix lots of Doxygen warnings.

Fix Doxygen comment for IO_MGR::FootprintEnumerate() which was recently
changed.
2017-06-13 19:47:46 -04:00
Kristoffer Ödmark 19d5cc7548 Removed all exception specifiers since deprecated.
Exception specifiers are deprecated in cpp11, so went through them all
and removed them from the code.
2017-06-12 13:54:55 -04:00
jean-pierre charras ad48cd435d Replace SetToolID( ID_NO_TOOL_SELECTED, ...) by SetNoToolSelected() in code 2017-06-12 16:17:48 +02:00
jean-pierre charras 526b5e2cd3 Fix broken behavior of the "Zoom to selection" tool in Gerbview and Eeschema. 2017-06-10 09:07:17 +02:00
jean-pierre charras 51bed4bae9 Fix incorrect handling of wxID_CANCEL and Close events in DIALOG_BOM_EDITOR. 2017-06-07 18:43:53 +02:00
danngreen a18d72b5d6 Made BOM editor dialog quasi modal 2017-06-06 13:43:08 -04:00
Bernhard Stegmaier 0e71686bfd Reunion of zoom toolbar buttons.
The zoom window toolbar button is on the right toolbar separated from the
other zoom buttons on the top toolbar.  Move the zoom window button to the
top toolbar beside the other zoom buttons.
2017-06-06 09:35:20 -04:00
Cheng Sheng 521e18ddbd "Show Datasheet" button: Resolve env-vars (like ${KIPRJMOD}) if appears.
This way, the datasheets can be stored within the project dir, and referred as ${KIPRJMOD}/relative/path/to/datasheet.
2017-06-06 08:30:35 -04:00
jean-pierre charras bea4664311 Fixes: lp:1695751 (EEschema: "Not-connected" flag not movable)
https://bugs.launchpad.net/kicad/+bug/1695751
2017-06-05 18:16:08 +02:00
jean-pierre charras 0d2634fe2d Fix incorrect declaration of a translatable string. 2017-06-05 18:16:08 +02:00
Fabrizio Tappero ac9a64a173 general UI fix. Fixed a lot of icons and a lot of menu.
Also a few no longer used .cpp icon files are removed.
2017-06-02 11:51:11 +02:00
Andrey Fedorushkov ddec8036c1 Eeschema: fix an other erroneous "unit value out of range" test. 2017-05-31 15:43:28 +02:00
jean-pierre charras c0bb8a30c2 Fixes: lp:1694456
https://bugs.launchpad.net/kicad/+bug/1694456

EEschema load: report "unit value out of range" in sub-sheet, although it is not the case.
2017-05-31 10:20:49 +02:00
jean-pierre charras e9577a1025 Fixes: lp:1692706 (eeschema cache lib not rebuilt when saving schematic, and existing symbols already in cache are not updated)
https://bugs.launchpad.net/kicad/+bug/1692706
2017-05-29 18:22:36 +02:00
jean-pierre charras 2100c29a1a Fixes: lp:1692436 (reset to defaults in Eeschema, edit component properties, puts fields in the wrong position)
https://bugs.launchpad.net/kicad/+bug/1692436
2017-05-24 21:19:26 +02:00
Oliver Walters ea855c1abf Fixed duplicate field names
- Now works correctly even if users overload default field names
2017-05-22 15:29:33 -04:00
Oliver 2a3a699d98 Component table is left aligned 2017-05-18 08:37:08 -04:00
Maciej Suminski e79f97860c Bezier2Poly refactor
Before the refactor library browser display Bezier curves correctly only
once, at other times they were just straight lines or crashed the
application.
2017-05-16 17:58:09 +02:00
jean-pierre charras c5b09696ab Eeschema bom scripts: move python scripts to eeschema/plugins/python_scripts and xsl scripts to subdir xsl_scripts.
Python scripts are now installed (previously: were ignored by the make install command)
2017-05-13 16:52:56 +02:00
jean-pierre charras 305a166e95 Pcbnew: update immediately the 3D viewer opened from the footprint editor/viewer/wizard after a change. 2017-05-13 08:17:06 +02:00
Wayne Stambaugh 747583606b Eeschema: fix regression when sheet files are not in project path.
Fixes lp:1683921

https://bugs.launchpad.net/kicad/+bug/1683921
2017-05-10 16:05:06 -04:00
Oliver Walters d4e41c4f97 Component table improvements 2017-05-08 12:43:20 +02:00
Wayne Stambaugh c70adcdf31 Don't apply last line width to text thickness in symbol library editor.
The symbol library header was setting the text thickness using the
last line thickness setting which is incorrect so use the default
thickness when creating new text objects.

Fixes lp:1635344

https://bugs.launchpad.net/kicad/+bug/1635344
2017-05-03 16:20:46 -04:00
jean-pierre charras 342f28f106 dilaog bom editor: fix min sizes. 2017-05-03 08:56:32 +02:00
Oliver Walters 5fe13c01c7 Improvements for component table 2017-05-03 08:56:31 +02:00
jean-pierre charras e4d2924ee2 Make a sentence translatable in dialog_bom_editor. 2017-05-02 19:51:02 +02:00
Oliver Walters 29e3e55ad3 Removed BOM functionality
- Removed ability to generate BOM to file
- Removed Save/Cancel window when closing table
- No longer updates table <after> table is closed
- Bugfix for field names (previously comparison was case insensitive)
2017-05-02 09:40:02 -04:00
Oliver Walters 48893ab2b1 Fixed UNDO behaviour
- Undo actions are pushed to the appropriate sheet(s)
- Each sheet's actions are grouped together
2017-05-02 09:39:56 -04:00
Oliver Walters 47ee2773d2 Reworked field association
- Allow duplicate components to access same field data
2017-05-02 09:39:51 -04:00
Oliver Walters d792e36151 Reworked UI
- Buttons are enabled/disabled within wxUpdateUI events
- Save/Cancel dialog used to close window and apply (or reject) changes
2017-05-02 09:39:40 -04:00
Oliver Walters 59470c3b5e Fixed display of references for duplicate sheets
Display part reference rather than REFERENCE field value
2017-05-02 09:39:34 -04:00
Oliver Walters 8dd4aca73b Mark schematic as dirty
Notify schematic of changes when window is closed
2017-05-02 09:39:24 -04:00
Oliver Walters 5126332c57 Fixed wxString::Format assert 2017-05-02 09:39:08 -04:00
Oliver a39856485c Added component table dialog
- Allows grouping of matched components
- Bulk edit of components in a spreadsheet window
- User can choose to save / undo changes
- All changes are pushed to the undo stack in a single operation
- Export table to HTML / CSV output
2017-05-02 09:39:01 -04:00
Dick Hollenbeck 50716c9015 Fix BOM generation bug for components with multiple units.
Sadly, each unit of a component can have its own unique fields. This
change finds the last non blank field and records it. Last guy wins
and the order of units occuring in a schematic hierarchy is variable.
Therefore user is best off setting fields into only one unit. But this
scavenger algorithm will find any non blank fields in all units and use
the last non-blank field for each unique field name.

Fixes lp:1471417

https://bugs.launchpad.net/kicad/+bug/1471417
2017-04-24 10:16:32 -04:00
Maciej Suminski 801e50450b Revert "Fix component chooser dialog crash if there are no FPs available"
This reverts commit 0a8a659ff7.
The patch is incorrect, as it removes the FP chooser drop-down list.
I cannot reproduce the crash with the patch reverted, so there must
have been something specific to my configuration at that time.
2017-04-13 10:58:10 +02:00
jean-pierre charras 02abf18046 Eeschema: speed up netlist creation. 2017-04-12 08:18:46 +02:00
Wayne Stambaugh 578f01bfd9 Fix debug build error in symbol remap dialog. 2017-04-05 08:43:05 -04:00
Wayne Stambaugh 36606ceeb7 Add symbol library table remapping dialog.
Create dialog and code to allow legacy schematic symbols to be remapped
from the old library path look up method to the new symbol library table
method by using the following steps:

  1) Create a project symbol library table containing all of the symbol
     libraries defined in the old library look up list not found in the
     global symbol library table.

  2) Map each symbol to the correct symbol in the symbol library table
     if possible.

Recreate library link to symbols so look up method can be converted to
symbol library table properly.

Add function to SCH_COMPONENT to link library symbols using the symbol
library table.
2017-04-04 18:31:28 -04:00
jean-pierre charras 1f3fe6fefb Fix Eeschema: Part library editor "save current library as" crash if no current library selected.
Fixes: lp:1678698
https://bugs.launchpad.net/kicad/+bug/1678698
2017-04-03 07:58:34 +02:00
jean-pierre charras 2f9be81b19 Very minor change in 2 strings to help I18n translations. 2017-04-02 11:51:40 +02:00
Wayne Stambaugh 9c2ebf32f1 Initial symbol library table implementation prep work.
Add loading symbol library table code to schematic PROJECT object.

Fix minor issues with loading global symbol library table.

Add default symbol library path environment variable to the environment
variable list and change the variable name to KICAD_SYMBOL_DIR.

Add code to SCH_SCREENS to test if all library nicknames of the symbol
library IDs are empty.

Remove unnecessary KICAD_USE_SCH_IO_MANAGER build option.
2017-03-31 16:29:34 -04:00
Fabrizio Tappero dcaa0559de Minor edit component properties dialog improvements. 2017-03-31 15:30:00 -04:00
Maciej Suminski 0a8a659ff7 Fix component chooser dialog crash if there are no FPs available 2017-03-31 17:15:09 +02:00
Chris Pavlina 3234087dc9 Move wxDataViewCtrl manipulators out of dialog_choose_component.cpp
Fixes: lp:1677925
* https://bugs.launchpad.net/kicad/+bug/1677925
2017-03-30 21:47:14 -04:00
Jon Evans 3ec28e2acf Refactor layer enumerations to all live in the same place 2017-03-30 16:01:48 -04:00
Wayne Stambaugh 40f60c9871 Fix netlist generation bug cause when component unit is set to zero.
Fix if statement logic to ensure the unit number is never set to zero.

Add logic to the legacy schematic plugin to automatically convert any
schematic files that have components with a unit setting of zero.  Set
the schematic modified flag so that the user will be notified of a
changed schematic.

Add a user warning when the schematic parser fixes the bug and sets
the file modified flag.

Fixes lp:1677282

https://bugs.launchpad.net/kicad/+bug/1677282
2017-03-30 15:44:47 -04: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 a9afb872d5 libedit: fix crash on Delete Component with no selection
This bug was actually here before the new component chooser this time;
I'm not sure what the purpose of this error message was since it is
being displayed in a non-error state. Maybe a copy/paste bug from when
Delete Component was changed to use the main component chooser?
2017-03-27 08:07:30 -04:00
Chris Pavlina d2b0a4b358 Component chooser: show aliases better
- In the listing, display alias names in italics
- In the info panel, display per-alias description correctly, as well as
  root description

Fixes: lp:1676190
* https://bugs.launchpad.net/kicad/+bug/1676190
2017-03-27 07:55:26 -04:00
jean-pierre charras cfac7bd31c Eeschema: fix a crash when closing the choose component dialog by OK button, if no component selected. 2017-03-27 08:53:19 +02: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
Chris Pavlina 849b3c2a4b Add footprint select dropdown to component chooser, serious refactoring
- DIALOG_CHOOSE_COMPONENT has footprint select widget
- FOOTPRINT_SELECT_WIDGET
- FOOTPRINT_CHOICE widget (customized wxComboCtrl)
- FOOTPRINT_FILTER class
- FOOTPRINT_INFO rework:
    - FOOTPRINT_ASYNC_LOADER to load without freezing UI
    - Rewrite loader threads as queue-driven thread pool
    - Make FOOTPRINT_INFO available via kiway
- FP_LIB_TABLE::PrefetchLib
- Access to global fp-lib-table via kiway
- SYNC_QUEUE threadsafe queue template
- Remove KICAD_FOOTPRINT_SELECTOR build option
2017-03-24 09:20:27 -04:00
Maciej Suminski b47a6e415b Fixed a memleak in DIALOG_CHOOSE_COMPONENT 2017-03-23 16:52:33 +01:00
John Beard e98ae3e463 Move executable name constants to own file
The executable name constants are only used by two files, they do not
have to be in common.h.

Also converted to const wxString for better type-safety and removed
old-style wxT macros.
2017-03-23 09:23:45 -04:00
Chris Pavlina 72cfd38979 De-templatify CMP_TREE_MODEL_ADAPTER::FindAndExpand
std::function lets this be a plain method instead of a template; this
cleans up the header a bit and possibly reduces a bit of bloat
2017-03-21 22:45:36 -04:00
Chris Pavlina b2f1d22bbf Fix preselect in CMP_TREE_MODEL_ADAPTER 2017-03-21 22:45:17 -04:00
Chris Pavlina ef12f0bcbc Fix warning: shadowed wxWindow::IsShown in sim_plot_panel.h 2017-03-19 09:18:28 -04:00
Chris Pavlina bfa22c6ce8 Fix warning: uninitialized constant in sim_plot_panel.h 2017-03-19 09:18:23 -04:00
Wayne Stambaugh 9ddb4fe67e Fix uncaught exception in footprint and symbol library table parsers.
Fixes Coverity CID 154580
Fixes Coverity CID 154581
Fixes Coverity CID 154582
Fixes Coverity CID 154583
Fixes Coverity CID 154584
Fixes Coverity CID 154585
2017-03-17 07:56:47 -04:00
jean-pierre charras ccfad8306b eeschema: fix an annoying issue created by commit fdb53f28e6b666f242c3d24dfbfb0e4050bfa2ad: enter a label size starting by 0 (like 0.3) was not possible. 2017-03-14 20:40:21 +01:00
Oliver fdb53f28e6 Improvement for label edit dialog in eeschema:
- Added wxTE_RICH property to label text controls (allows ctrl+backspace in Windows)
- Added numeric validator to text size
2017-03-14 13:08:36 -04:00
Oliver 3fc62d5fcd Improve right-click menu entry for doc
- Changed "doc" to "Open Documentation"
2017-03-13 09:58:05 -04:00
jean-pierre charras 8f3fc7b858 Optimization in class_library.cpp: speed up power component list creation. 2017-03-13 12:49:24 +01:00
jean-pierre charras 28a6ca1e23 Eeschema: fix wrong position of symbol fields when adding a symbol in a schematic
Fixes: lp:1665718
https://bugs.launchpad.net/kicad/+bug/1665718
2017-03-12 17:04:42 +01:00
Chris Pavlina 5e5259b59c CMP_TREE_MODEL*: fix uninitialized members
Coverity CID 157141
Coverity CID 157136
2017-03-11 19:27:44 -05:00
Chris Pavlina bbaa29fbc4 Refactor FOOTPRINT_PREVIEW_PANEL
- Pull out compound widget bits into FOOTPRINT_PREVIEW_WIDGET
- Move all pcbnew-specific bits *inside* pcbnew; implementation should
  be private for users
- Make a few class members and inner types private
2017-03-10 23:26:45 -05:00
jean-pierre charras de30dc9f5d Speed up schematic libraries loading. 2017-03-10 21:17:56 +01:00
Chris Pavlina a72d32d3fd Test for dangling pins after symbol is edited
Fixes: lp:1562897
* https://bugs.launchpad.net/kicad/+bug/1562897
2017-03-10 12:01:12 -05:00
Wayne Stambaugh 9636086f52 Fix build bug for const incorrectness. 2017-03-10 10:09:55 -05:00
Wayne Stambaugh cc64c6af1d Fix broken symbol link in schematic after editing.
The save current symbol command had a different code path then save current
library so the schematic symbol was not being refresh after is was modified
in symbol editor.

Split out the save current symbol command from Process_Special_Functions()
to help reduce function growth hormone imbalance syndrome.

Some coding policy fixes and wxT() macro removal.

Fixes lp:1671456

https://bugs.launchpad.net/kicad/+bug/1671456
2017-03-10 08:39:29 -05:00
Chris Pavlina 7bf4c90be5 Component chooser: properly normalize description/keywords
Fixes: lp:1671814
* https://bugs.launchpad.net/kicad/+bug/1671814
2017-03-10 08:34:20 -05:00
jean-pierre charras 0be56451b1 More optimization in project rescue. 2017-03-10 10:31:50 +01:00
jean-pierre charras 4605cae588 Displays the number of instances to modify in rescue dialog. 2017-03-09 19:16:24 +01:00
jean-pierre charras ae7e3f725b Speed up project rescue calculations, by optimizing the number of searches in libs. 2017-03-09 18:13:03 +01:00
jean-pierre charras 2a91d7bc21 Speed up SCH_COMPONENT::ResolveAll(). 2017-03-09 15:46:12 +01:00
Chris Pavlina 82f587f4ff Show the busy cursor while loading component chooser 2017-03-08 15:34:11 -05:00
Chris Pavlina 2e4e0a9a05 Minor cleanup in cmp_tree_model_adapter.h 2017-03-08 14:49:00 -05:00
Chris Pavlina 7ee0adabd7 Optimize component chooser startup time more
- Stop wx from sorting the items. We've already sorted them, and
  profiling shows our sort is faster than theirs.

- Go back to using strings as cache keys, because using pointers means
  the cache doesn't survive from one invocation to the next. Switch to
  wxHashMap because it can use wxString keys in an unordered (faster)
  map.
2017-03-08 14:41:34 -05:00
Chris Pavlina 28848373ce CMP_TREE_MODEL: add the correct number of units
Fixes: lp:1671174
* https://bugs.launchpad.net/kicad/+bug/1671174
2017-03-08 12:39:44 -05:00
Chris Pavlina 3bddc14dc6 CMP_TREE_MODEL_ADAPTER: use more suitable cache type
Fixes: lp:1671086
* https://bugs.launchpad.net/kicad/+bug/1671086
2017-03-08 12:34:11 -05:00
Chris Pavlina 2232edfb87 Rewrite DIALOG_CHOOSE_COMPONENT without wxFormBuilder
This will allow near-future use of controls not supported by
wxFormBuilder with minimal hackery.
2017-03-08 12:00:49 -05:00
Chris Pavlina 36e400ec5b Avoid collapsing component chooser column widths to zero
Fixes: lp:1670762
* https://bugs.launchpad.net/kicad/+bug/1670762
2017-03-07 14:59:51 -05:00
Chris Pavlina 2bb234d3f5 Fix assert in DIALOG_EESCHEMA_CONFIG when removing many libs at once 2017-03-06 17:24:12 -05:00
Simon Richter 12c1339296 Remove false "override" comments. 2017-03-06 16:34:56 -05:00
jean-pierre charras 0b3e5952b7 Eeschema: fix a crash if a schematic project was not loaded due to a incorrect file format error (Linux only)
Fixes: lp:1670322
https://bugs.launchpad.net/kicad/+bug/1670322
2017-03-06 21:41:43 +01:00
Chris Pavlina f8415633bd Switch component chooser to wxDataViewCtrl, refactor
This refactors COMPONENT_TREE_SEARCH_CONTAINER into a Model-View-Adapter
architecture comprising:

- eeschema/cmp_tree_model.h
    - CMP_TREE_NODE: Base class representing a searchable library
        set with scoring and sorting

        - CMP_TREE_NODE_UNIT
        - CMP_TREE_NODE_ALIAS
        - CMP_TREE_NODE_LIB
        - CMP_TREE_NODE_ROOT

- eeschema/cmp_tree_model_adapter.h
    - CMP_TREE_MODEL_ADAPTER: mediator between wxDataViewCtrl (via
        wxDataViewModel) and CMP_TREE_NODE*

                   +---+                      +------------------+
 +---+  Generates  | A |                      |       VIEW       |
 | M |  from libs  | D |   wxDataViewModel    |------------------|
 | O | <---------- | A | <------------------> |  wxDataViewCtrl  |
 | D |             | P |                      |------------------|
 | E | <---------> | T | <------------------- |    wxTextCtrl    |
 | L | UpdateScore | E | UpdateSearchString() |------------------|
 +---+             | R |                      |                  |
                   +---+                      +------------------+

Representing the data with a proper model allows the wxDataViewCtrl to
be updated in bulk, which is significantly faster than the old method of
populating it one item at a time. This also adds flexibility if more
data is to be added in the future (which may come in handy with the
upcoming .sweet format, as that adds more ways components can be related
to each other).

Replacing the wxTreeListCtrl with a wxDataViewCtrl also significantly
reduces the general GUI quirkiness, as wxDataViewCtrl is much more well
behaved.
2017-03-06 09:50:48 -05:00
Wayne Stambaugh d9260d42c8 Fix broken schematic symbol library links in sub-sheets.
Only the root sheet symbol library links were being updated when the
schematic was loaded so changed call to update all sheets.

Fixes lp:1670079

https://bugs.launchpad.net/kicad/+bug/1670079
2017-03-05 13:18:26 -05:00
Wayne Stambaugh f181961866 Remove excessive schematic symbol library re-linking.
For some reason, the schematic symbol library link was being regenerated
every time the schematic was redrawn in SCH_SCREEN::Draw().  Remove the
re-link call from the Draw() and Plot() functions.

Add function the SCH_SCREENS to update the links in all of the schematic
sheets.

Update all schematic sheet symbol library links whenever the symbol
library list is modified or any library in the library list is modified.
That should cover all cases where the symbol library links could be
broken.

Refresh schematic window after applying library changes to update any
possible symbol changes.

Add KIWAY message to update the schematic when symbol library changes
could change the schematic.  The KIWAY mail was used because the schematic
frame is not a parent of the symbol library editor so wxEvents cannot be
used.
2017-03-04 16:02:33 -05:00
Wayne Stambaugh 84835ed4e1 Use component library symbol when looking for a pin in the schematic.
For some reason, rather than using the LIB_PART object reference by an
SCH_COMPONENT to check if a pin was at a given position in the schematic,
a LIB_PART search was performed for every component in a schematic.  This
made absolutely no sense and was changed to use the LIB_PART referenced
by the SCH_COMPONENT object.  This should significantly speed up any
operations that call SCH_SCREEN functions, IsTerminalPoint(),
MarkConnections(), and IsJunctionNeeded().

Add function to SCH_COMPONENT to access PART_REF object.
2017-03-04 15:16:44 -05:00
Chris Pavlina 551b2b2312 Component chooser: fix ugly border on macOS 2017-03-04 12:29:49 -05:00
jean-pierre charras 5b3d7962bb Fix questionable code and memory leak. 2017-03-04 17:35:34 +01:00
Chris Pavlina 4618e6c7f8 Component chooser: event and focus cleanup 2017-03-04 11:14:04 -05:00
Simon Richter 1502e27695 Remove debug code matching on specific component names 2017-03-03 08:30:48 -05:00