Commit Graph

89 Commits

Author SHA1 Message Date
Jeff Young b4c8657904 Fix non-visible-part or conversion items from getting selected.
Also renames lib_draw_item to lib_item to match the class.

Fixes: lp:1840170
* https://bugs.launchpad.net/kicad/+bug/1840170
2019-08-15 10:00:23 +01:00
Jeff Young d03041b565 Cleanup. 2019-07-02 21:36:42 +01:00
Jeff Young d6e9bdf07b Convert remaining legacy drawing code to print code. 2019-05-31 21:54:22 +01:00
Jeff Young 67cc2aac2e Rework Eeschema find/replace for modern toolset.
Fixes: lp:1827274
* https://bugs.launchpad.net/kicad/+bug/1827274

Fixes: lp:1827240
* https://bugs.launchpad.net/kicad/+bug/1827240
2019-05-22 21:48:04 +01:00
Jeff Young f6e07f575a Rename for clarity.
SetOffset() didn't set anything; it performed an action.
Move() suggests a delta, when it in fact does a SetPosition().
2019-05-10 16:11:57 +01:00
Jeff Young ea0941cab3 Implement modern tools for LibEdit. 2019-05-10 16:11:57 +01:00
Jeff Young fd546da640 Homogenize hit testing and selection return types.
Prep work for sharing SCH_SELECTION_TOOL with LibEdit.
2019-05-05 17:14:30 +01:00
Jeff Young 2aad4a5e57 Remove dead code from removal of eeschema legacy canvas. 2019-04-05 15:54:31 +01:00
Jeff Young 893f7641ce Handle hidden and dangling pins. 2018-10-09 11:08:55 +01:00
Tomasz Wlostowski 90c7c60471 eeschema-gal: initial GALified version. Lots of stuff still to do! 2018-10-09 11:08:52 +01:00
Jeff Young 49ea6e1670 Fix occurrences of "edition" which should be "editing"
Fixes: lp:1778168
* https://bugs.launchpad.net/kicad/+bug/1778168

(cherry picked from commit bcb1220)
2018-07-17 15:12:39 +01:00
Jeff Young eacaa39aa2 Remove global units usage from GetSelectionText...
... and GetMsgPanelInfo.

Step 4 in the g_UserUnit eradication effort.

Also removes a couple of conversion routines that were close
enough to extinction.

(cherry picked from commit c75da51)
2018-07-17 15:11:09 +01:00
Jeff Young bcd9a7745d Make the pin table editable.
Also adds generic icon + text grid renderer and grid editor.

Fixes: lp:1521055
* https://bugs.launchpad.net/kicad/+bug/1521055

Fixes: lp:1528817
* https://bugs.launchpad.net/kicad/+bug/1528817

(cherry picked from commit 067f777)
2018-07-17 15:10:06 +01:00
Jeff Young 99ad5cf394 More performance optimizations for symbol libraries
1) don't call UI-level LIB_PIN routines when reading library --
not only are they a performance hit, they set the modified flag
too
2) limit progress dialog updating to 15 times a second (this
had crept back up to 31% of the time spent loading libraries)

Fixes: lp:1734773
* https://bugs.launchpad.net/kicad/+bug/1734773
2018-01-30 10:31:51 -05:00
jean-pierre charras d0754acf00 Fix code after renaming files 2018-01-29 11:37:29 +01:00
Jeff Young 829c236437 Symbol library load performance enhancements.
1) Edit Symbol gets similar fix as Place Symbol
2) progress dialog updating reduced to once every 50ms
3) SearchText gets lazy normalization
4) TypeNames get lazy translation
5) default fieldNames get translated a single time per language change

These fixes reduce first-load-time of both Edit Symbol and Place Symbol
by about 2/3, and second-load-time of Edit Symbol to near-instantaneous.
2018-01-27 08:29:43 -05:00
jean-pierre charras 6322c90c50 Symbol editor: Fix incorrect pin edition coupling for non interchangeable multi-units symbols.
Fixes: lp:1744680
https://bugs.launchpad.net/kicad/+bug/1744680
2018-01-22 13:33:24 +01:00
Wayne Stambaugh 694ad93385 Move LIB_PART save code to legacy schematic plugin.
This is the last of the object save/load code that was not moved into
the SCH_LEGACY_PLUGIN object.  All schematic and library I/O is now
performed in the SCH_LEGACY_PLUGIN object and as been removed from the
schematic and library objects.

The old single symbol file format has been replaced with the normal
symbol library file format since there was no difference between them
except the SYMBOL token.  The SYMBOL token was no longer being read
since the introduction of the SCH_LEGACY_PLUGIN symbol library loader.

Update the Doxygen comments in all of the modified files.
2017-12-01 11:49:44 -05:00
jean-pierre charras f992d144d9 Eeschema, LIB_PIN::SetNumber(): ensure spaces are replaced by _ and set modify flag on change.
Fixes: lp:1734187
https://bugs.launchpad.net/kicad/+bug/1734187
2017-11-28 21:02:29 +01:00
Wayne Stambaugh 0acdd9f02e Remove obsolete symbol library item load code. 2017-11-27 14:42:22 -05:00
Russell Oliver aeb43b055c Eeschema Eagle Import: Fix power symbol import. - Set pins to power in to match current power supply symbols. - Change IsPowerConnection() to match POWER_IN pins from power symbols as well. 2017-10-20 08:38:39 +02:00
Oliver Walters 948dfe88ce Added option to not test other pins when setting pin parameters
- On loading from file, other pins are not LINKED and thus can be ignored
- 90% reduction in library load time when launching eeschema
2017-09-28 13:10:08 -04:00
Maciej Suminski 85be485c34 Enable long names for pin numbers and pads
- pad names are stored as wxString instead of a char[4] & integer union
- removed pad name to string conversion functions
- fixed pad & pin properties dialog restrictions regarding the name
length
2017-09-19 18:19:49 +02:00
jean-pierre charras 22a8df69c4 Fix a few doxygen warnings 2017-06-30 16:03:17 +02:00
Maciej Suminski d7bf44eee0 Removed a few more headers from base_struct.h 2017-02-22 17:54:01 +01:00
Maciej Suminski 0dc88bb4cf Changed COLOR4D defines to static consts 2017-02-22 17:35:00 +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
jean-pierre charras f15a59f0ad Component Editor and Component viewer: add option to show the electrical pin type. 2016-11-04 12:13:22 +01:00
jean-pierre charras 1924478558 Eeschema: editors: show the pin position (when clicking on it) in message panel.
Pin properties dialog: show pin position ( and allow editon ).
2016-10-18 18:59:26 +02:00
Simon Richter ad088db6d2 Add more "override" markers. 2016-09-25 13:59:41 -04:00
Simon Richter 59c81976dc Explicitly mark overriding functions. 2016-09-24 14:53:15 -04:00
Dick Hollenbeck c2b8a4ee43 Move from class INSPECTOR as the EDA_ITEM::Visit() callback interface to a std::function
callback.  This improves conciseness and encourages use of Visit() due to the lower cost
of entry in C++.
2016-07-12 15:05:54 -04:00
unknown 4b103baa3a Enum refactoring and shiny icons in dialog_lib_edit_pin_table 2016-02-28 18:33:29 +01:00
unknown 79422f929e Update comments (ElectricPinType -> ELECTRICAL_PINTYPE) 2016-02-20 20:00:22 +01:00
jean-pierre charras 37c26cba71 Eeschema: Do not use ElectricPinType for SheetLabel items. ERC does not use ElectricPinType to test sheet labels, which do net have an actual electrical type property
Replace ElectricPinType by ELECTRICAL_PINTYPE as enum name to be compliant with coding style.
Enforce ELECTRICAL_PINTYPE control in methods.
2016-02-19 17:51:23 +01:00
Chris Pavlina 50c418a332 Eeschema: add field automatic placement feature. 2015-12-13 11:56:47 -05:00
Chris Pavlina 3921f78ac2 Eeschema: fix connection indicators for power symbol targets. 2015-07-21 10:07:52 -04:00
Chris Pavlina e94ebf561e Eeschema: fix connection indicator. (fixes lp:1476005).
* When multiple pins are in the same position and one is not connected,
  show connection indicator correctly.
* LIB_PIN::IsVisible should be a const method so it can be called on
  DANGLING_END_ITEM children without having to discard const.
* Test the (!IsVisible() && GetType() == PIN_POWER_IN) condition in a method
  LIB_PIN::IsPowerConnection to avoid duplicating that condition if the test
  needs to be performed in more than one place. (e.g. dunderheads like myself
  might forget about the necessary GetType() == PIN_POWER_IN and just check
  visibility.)
* Coding style fix: break a couple lines that were above the 99-column maximum.
* Add and/or improve Doxygen comments on SCH_COMPONENT::IsPinDanglingStateChanged
  and SCH_COMPONENT::IsDanglingStateChanged.
2015-07-20 15:49:32 -04:00
Chris Pavlina eb800d903f Hide pin and wire targets to show wire connections in Eeschema. 2015-06-07 20:07:42 -04:00
jean-pierre charras d38c9b205f Extend max number of units per package: fix incorrect unit string for unit >= 52. Fix unit list limited to 26 in dialof edit compinent in schematic..cpp
lib_pin.cpp: in 4 functions, use an unsigned param instead of int, for  a better code.
2015-04-07 15:19:30 +02:00
jean-pierre charras 4def0958a5 Fix some coverity warnings. Fix typo and errors in comments. Very minor other fixes. 2015-04-03 11:13:06 +02:00
jean-pierre charras f5c47a191b eeschema: fix Bug #1437604 (double translation of some messages in pin editor dialog) relative to some static strings flagged "to be translated".
This is due to the fact static strings flagged translated ( _("string") notation)  are not translated  when they are static only if they are not inside a dll.
When they are static inside a dll, the dictionary is already loaded, and the constructor translate them.
Therefore they can be translated twice in dialogs are calling wxGetTranslation to show them, if the application is run from kicad.
But if the application is run as stand alone, the translation is made only once (as expected).
2015-04-02 20:51:47 +02:00
unknown 561c018035 Add pin table dialog 2015-03-27 11:26:07 +01:00
jean-pierre charras 00f8994ee1 Eeschema: Fix a (minor but annoying) bug detected by coverity which prevent Eeschema to draw components in "fast mode" (i;e. without pin texts) when they are moved, due to a draw parameter which was incorrectly used.
Move items rework: enhancements: for some items (sheets, components, bus entries) the mouse cursor is no more wrapped to the anchor. For large symbols, this is better: they are more easy to place.
There is also a change when starting a move item command: the full screen is redraw, and therefore there is no artifact due to the XOR draw mode.
Some other minor coverity fixes (uninitialized members).
2015-02-28 17:56:09 +01: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 a1087801af Various fixes to pin drawing code
- Better shape to the 60617 pin markers
- Made the markers' size proportional to the pin text
- Added the missing implementation in the pin plot routines
2014-05-13 21:24:12 +02:00
Lorenzo Marcantonio 73a8cd6180 Added eeschema option for the default pin length 2014-05-12 18:57:46 +02:00
Lorenzo Marcantonio 342016b692 Constification of HitTest and GetParent
In particular HitTest for zones *do not* select the nearest vertex/edge as a side effect
2014-05-04 19:08:36 +02:00
Dick Hollenbeck 2c67c3ff80 * KIWAY Milestone A): Make major modules into DLL/DSOs.
!   The initial testing of this commit should be done using a Debug build so that
    all the wxASSERT()s are enabled.  Also, be sure and keep enabled the
    USE_KIWAY_DLLs option.  The tree won't likely build without it.  Turning it
    off is senseless anyways.  If you want stable code, go back to a prior version,
    the one tagged with "stable".

*   Relocate all functionality out of the wxApp derivative into more finely
    targeted purposes:
    a) DLL/DSO specific
    b) PROJECT specific
    c) EXE or process specific
    d) configuration file specific data
    e) configuration file manipulations functions.

    All of this functionality was blended into an extremely large wxApp derivative
    and that was incompatible with the desire to support multiple concurrently
    loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects.
    An amazing amount of organization come from simply sorting each bit of
    functionality into the proper box.

*   Switch to wxConfigBase from wxConfig everywhere except instantiation.
*   Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD,
    PGM_SINGLE_TOP,
*   Remove "Return" prefix on many function names.
*   Remove obvious comments from CMakeLists.txt files, and from else() and endif()s.
*   Fix building boost for use in a DSO on linux.
*   Remove some of the assumptions in the CMakeLists.txt files that windows had
    to be the host platform when building windows binaries.
*   Reduce the number of wxStrings being constructed at program load time via
    static construction.
*   Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that
    these functions are useful even when the wxConfigBase comes from another
    source, as is the case in the KICAD_MANAGER_FRAME.
*   Move the setting of the KIPRJMOD environment variable into class PROJECT,
    so that it can be moved into a project variable soon, and out of FP_LIB_TABLE.
*   Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all
    its child wxFrames and wxDialogs now have a Kiway() member function which
    returns a KIWAY& that that window tree branch is in support of.  This is like
    wxWindows DNA in that child windows get this member with proper value at time
    of construction.
*   Anticipate some of the needs for milestones B) and C) and make code
    adjustments now in an effort to reduce work in those milestones.
*   No testing has been done for python scripting, since milestone C) has that
    being largely reworked and re-thought-out.
2014-03-19 19:42:08 -05:00
jean-pierre charras 5f01f123de All: GetBoundingBox returns now a const EDA_RECT.
Pcbnew: Code cleaning and bug fix in autoplace functions
Dialog exchange footprints has now a separate button to update the .cmp file, only on request.
2013-11-24 18:48:14 +01:00