Commit Graph

55 Commits

Author SHA1 Message Date
Jeff Young 9c7c05c161 Mostly formatting cleanup but a few type-casting cleanups too. 2020-11-24 22:16:41 +00:00
Werni 0e44f5128c Add const specifiers 2020-11-18 19:50:36 +00:00
Jeff Young bddc97df30 LibEdit -> SymbolEditor 2020-10-31 10:28:21 +00:00
Marek Roszko 5302f7ce73 Remove kicad_string.h from eda_text.h 2020-10-14 19:18:38 -04:00
Mikolaj Wielgus 400c15b8eb Add mils to units, remove useMils variables 2020-10-03 20:06:56 +00:00
Mateusz Majchrzycki 1c2ab0f523 eeschema: fixed auto increment of pin position in Pin Table
CHANGED: Pin position is now incremented properly in the Pin Table
dialog. The Pin position is ussing Internal Units insted of mils, so
the hardcoded 50/100 mils spacing has to be converted to IU before
adding.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/5730
2020-09-22 23:46:50 +00:00
jean-pierre charras 15c4a7b066 DIALOG_LIB_EDIT_PIN_TABLE: fix incorrect handling of Cancel button 2020-09-04 09:49:54 +02:00
Jeff Young 97c34e2516 ADDED alternate pin definitions and assignments.
Fixes https://gitlab.com/kicad/code/kicad/issues/2002
2020-08-21 18:29:36 +01:00
Jeff Young e1c449902d Ask user before throwing away changes to DRC Rules.
Fixes https://gitlab.com/kicad/code/kicad/issues/5135
2020-08-10 23:43:24 +01:00
Jeff Young dcd02539e3 Remove linked-pin processing from LIB_PIN's setters.
It belongs in the tool layer (specifically LIB_PIN_TOOL).
2020-08-03 22:21:35 +01:00
jean-pierre charras 98b1f55e29 Eeschema: minor fixes: fix incorrect label in DIALOG_LIB_EDIT_PIN, electrical pin list.
Gives also to functions GetText() and GetBitmap() a more significant name.

Fixes #5007
https://gitlab.com/kicad/code/kicad/issues/5007
2020-07-29 17:04:52 +02:00
Jeff Young 67bccaf465 Make indeterminate control states clearer for the user.
Fixes https://gitlab.com/kicad/code/kicad/issues/4313
2020-05-05 20:26:51 +01:00
Jeff Young 122b1ddaae Unwrap an unnecessary layer now that we have new config stuff. 2020-04-13 20:58:12 +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
Mark Roszko 70908043a3 Convert enums inside eeschema and the symbol editor to be scoped
Scope: NETLIST_ITEM, CONNECTION_TYPE, ELECTRICAL_PINTYPE,
       NET_CONNECTION, NETLIST_ITEM, GRAPHIC_PINSHAPE

Note, the pin type enum had PT_ added to the front to prevent
shadowing of the INPUT symbol on msys2 (see discussion at
c17c9960d8)
2020-01-18 20:51:28 +00:00
Ian McInerney 81ee5edcaf Test dynamic_cast for safety from future changes 2020-01-13 15:22:26 +00:00
Jeff Young 8576a4a067 Fix unchecked array access (from Coverity scan). 2020-01-10 22:32:50 +00:00
Mark Roszko 11ff16be4e Switch to scoped enums 2019-12-20 14:11:39 +00:00
Seth Hillbrand f4a1fef3b0 Adjust pin table sort
The sort routine requires the value to be true with a is strictly lower
than b.  But just inverting the '<' doesn't yield strictly lower, it
includes '>='.  This causes items to jump in the list.
2019-11-12 17:24:57 -08:00
Jeff Young 97212acecb Sort pins by number when grouping by name.
Fixes: lp:1828648
* https://bugs.launchpad.net/kicad/+bug/1828648
2019-08-21 20:34:01 +01:00
John Beard eccadd92fb Eeschema: fix resizing of pin table and edit symbol dialog
These dialogs had logic to avoid a table re-adjustment unless
the width changed. This was done to avoid spurious resizing
calls under GTK+3. This was commit
13249b723b, fixing bug lp:1817810.

However, by only calling event.Skip() when the width changed,
redraws were inhibited when only the height changed.

Placing the Skip() outside the width-change check fixes this,
and does not re-introduce the lp:1817810 bug (it is the column
adjust call that causes that).

Fixes: lp:1826615
* https://bugs.launchpad.net/kicad/+bug/1826615
2019-04-27 14:01:05 +01:00
Jeff Young d928aa9780 Infer pin properties from last pin and default pin pitch.
Fixes: lp:1822183
* https://bugs.launchpad.net/kicad/+bug/1822183
2019-04-05 18:52:51 +01:00
jean-pierre charras b00413b7d6 Symbol editor, DIALOG_LIB_EDIT_PIN_TABLE: fix crash when trying to delete a pin when the table is empty.
Fixes: lp:1822406
https://bugs.launchpad.net/kicad/+bug/1822406
2019-03-30 09:29:38 +01:00
Seth Hillbrand 13249b723b Handle excessive resize requests
For unknown reasons, GTK3 may send resize events when editing grid
fields.  This can cause the grid editor to exit, losing the focus and
overwritting the characters at the next input.

We avoid this by filtering the size events when the size doesn't change.

Fixes: lp:1817810
* https://bugs.launchpad.net/kicad/+bug/1817810
2019-02-27 11:32:30 -08:00
Seth Hillbrand c3a295df1a Fix segfaults from not checking index
Return value of wxArrayString.Index() always needs to be check for
existence.
2019-01-17 10:23:25 -08:00
Jeff Young 81a0ab4d7e Don't return wxID_OK from a cancel.
Also fixes the Save icon not getting enabled/disabled.

Fixes: lp:1810116
* https://bugs.launchpad.net/kicad/+bug/1810116
2019-01-10 17:41:33 +00:00
Seth Hillbrand 37967eb685 eeschema: init pin table local var
Explicitly set modified to false when instantiating
2019-01-02 19:41:18 -08:00
Maciej Suminski e3bcd31bff Added a dialog to confirm discarding unsaved changes in Pin Table dialog. 2018-11-16 16:10:53 +01:00
Jeff Young 55c1ca1191 Handle pin sorting properly for values.
The pin number sorter doesn't handle units at all, and seems to
stumble on negative numbers.

Fixes: lp:1796869
* https://bugs.launchpad.net/kicad/+bug/1796869
2018-10-09 14:56:29 +01:00
Jeff Young 618182dcd6 Use pin number sorting algorithm in pin table.
Fixes: lp:1793180
* https://bugs.launchpad.net/kicad/+bug/1793180
2018-09-19 22:23:18 +01:00
Jeff Young b90a261d5c More safety fixes for uncommitted grid changes. 2018-08-29 19:59:01 +01:00
Jeff Young 3e062867de Move all the grid workarounds into our own WX_GRID class.
(cherry picked from commit 08b4463)
2018-07-17 15:11:38 +01:00
Jeff Young 31aebe6920 UI infrastructure enhancements and bug fixes.
Work around wxWidgets failure to send first key through validator.

Unify treatment of INDETERMINATE values (such as for multiple
selections with mixed values).

(cherry picked from commit 7308729)
2018-07-17 15:10:15 +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 6b9866de8b Sort pins in pin-table.
Fixes: lp:1744509
* https://bugs.launchpad.net/kicad/+bug/1744509
2018-01-21 08:47:26 +01:00
jean-pierre charras d4dbdcd638 Symbol editor, Pin table editor: always display a icon in Pin Type column
At least on Linux, if a null icon is used as icon in Pin Type column, other icons are not
displayed. So the workaround is to use a neutral icon when a specific icon cannot be used
(i.e. when pins are grouped)

Fixes: lp:1559542
https://bugs.launchpad.net/kicad/+bug/1559542
2018-01-20 09:59:15 +01: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
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
Simon Richter 96ec9db5d6 Add missing C++ stdlib headers
The GCC standard library headers often include other headers, which makes
some code compile that forgets to include several headers.
2016-05-28 12:46:29 -04:00
unknown 4b103baa3a Enum refactoring and shiny icons in dialog_lib_edit_pin_table 2016-02-28 18:33:29 +01:00
unknown 8a9c6f71b7 Make pin position and pin type columns sortable in dialog_lib_edit_pin_table. 2016-02-19 16:59:31 +01:00
Simon Richter 769104d542 pin table: Support flat table 2016-01-14 21:26:42 -05:00
Chris Pavlina ca01527d20 Coding style fix in the previous patch 2016-01-14 21:21:54 -05:00
Simon Richter 64782736ac pin table: Add GetString() to retrieve string value for column
This is in anticipation of the introduction of icons -- retrieving all the
icons and throwing them away during sorting takes ages.
2016-01-14 21:21:26 -05:00
Simon Richter 3c5a4a3505 Add pin number summary
Below the pin table, display which pins are currently defined, in order to
find gaps.
2016-01-13 14:17:54 -05:00
Simon Richter 9e8acdc71a Move container functionality
The "set of pin numbers" functionality is also useful outside the pin table
dialog, so create a wrapper class that exposes the relevant interfaces.
2016-01-13 14:09:24 -05:00
Simon Richter a7b102c366 Move comparison helper class to generic header
This class wraps the comparison function in a way that is compatible with
std::map and std::set. This, too is generally useful, so it should be moved
to the generic header.

At the same time, the criterium for less-than is changed from "equal to -1"
to "smaller than 0", because technically the comparison function may return
other values.
2016-01-13 14:09:18 -05:00
Simon Richter 88ccd787a4 Split off pin number comparison
Pin numbers need to be ordered in more places in the future, so fold this
out of the pin table dialog into a utility class.
2016-01-13 14:09:07 -05:00
Simon Richter 2df8495e4f Eeschema: fix error in library pin table editor pin grouping broken in commit r5751.
* Coverity warns about falling through the switch statement which is acutally the correct behavior.
2015-06-27 17:34:43 -04:00