Commit Graph

81 Commits

Author SHA1 Message Date
Marek Roszko c4c56de708 Neurotically update position wxPoint usages 2022-01-01 11:55:51 -05:00
dsa-t d105e773a1 Update columns when height changes too 2021-12-25 15:26:43 +00:00
Alex 45c50535c5 Use GetUnobscuredSize in dialogs/panels 2021-12-25 15:26:43 +00:00
Jeff Young c3552a940a Make sure standard OK/Cancel buttons respond to current language.
Fixes https://gitlab.com/kicad/code/kicad/issues/9635
2021-12-24 18:13:11 +00:00
Jeff Young 6e2460ad37 Add hot-updating of units in common wxGrids.
Fixes https://gitlab.com/kicad/code/kicad/issues/10020
2021-12-23 16:54:03 +00:00
Jeff Young 8b52e969d6 Restore units to a bunch of wxGrids.
Fixes https://gitlab.com/kicad/code/kicad/issues/10063
2021-12-23 16:54:03 +00:00
Jeff Young 88fc6d25a7 Correctly handle deleting multiple selections in some grids.
Fixes https://gitlab.com/kicad/code/kicad/issues/9952
2021-12-12 17:28:17 +00:00
Seth Hillbrand cf6b18ec7e Remove escaped double-quotes
For some reason, escaped double quotes in wxString::Format cause issues
on Mac.  We can replace them with single quotes in most places without
loss of clarity
2021-11-03 17:03:14 -07:00
Simon Schaak f79cb382c4 Symbol editor: fix name corruption in pin table
Discard changes to pin numbers of grouped pins in the pin table to avoid
setting all pins of the group to the same number.
2021-11-01 22:10:13 +00:00
Seth Hillbrand 48f9dfa988 Revert "Fix grid cell highlight not functioning on Windows in the symbol pin table"
This reverts commit 94552ed838.

Breaks cell-based copy/paste
2021-10-10 08:04:11 -07:00
Marek Roszko 94552ed838 Fix grid cell highlight not functioning on Windows in the symbol pin table
Fixes https://gitlab.com/kicad/code/kicad/issues/9290
2021-10-01 23:44:16 -04:00
Jeff Young 5f5ee7335d Formatting. 2021-10-01 21:49:14 +01:00
Seth Hillbrand 2225c4e4ed Replace GetRows() with GetNumberRows() because wx 2021-09-28 10:48:04 -07:00
Seth Hillbrand 880f209563 When deleting pin row, show new highlight
When the user deletes a pin row, they need to see which row is now
selected for them to delete again.  Otherwise, deleting will have
unexpected consequences
2021-09-28 09:29:55 -07:00
Jeff Young 6aaf4413b3 Fix kicad_string.h / string.cpp mismatch.
They don't define a KiCad string class, so the header file name was
somewhat misleading. But the fact that they didn't match definitely
made coding more difficult.
2021-07-29 16:03:25 +01:00
Jeff Young 87e4a1c672 Remove cover type; capitalize class name; make filename equal classname. 2021-07-28 22:16:38 +01:00
Wayne Stambaugh 1a301d8eea Stop using wxDialog::EndModal() from inside dialogs.
Calling wxDialog::EndModal() directly from inside the dialog is a
potential bug if the dialog is shown in the modeless or window modal
(quasi-modal).  Use the internal button events where possible and
check for the appropriate mode before calling the correct end dialog
function.
2021-07-21 17:38:14 -04:00
Wayne Stambaugh 71c183d7bb Rename LIB_PART to LIB_SYMBOL. 2021-06-14 07:11:17 -04:00
Marek Roszko 33bbf85a3e Use the parent frame GetSettings helper rather than including for Pgm() 2021-06-06 19:05:12 -04:00
Jon Evans 18037e2f65 Rework bitmap system to load from archived PNGs
Bitmaps are now identified by an enum class instead of by pointers.
Bitmap loading and caching is now handled by a class in common, and
we no longer compile most bitmaps into the binary, so there is no
longer a bitmaps static library.

Instead, bitmaps are archived to a .tar.gz file which is installed
in ${KICAD_DATA}/resources/images.tar.gz

The source PNGs are checked in to Git as the original CPP files were,
so that people can build without the required dependencies to convert
SVGs to PNGs.

Initial support is also added for dark theme icons, although this
is not yet exposed in the GUI.

Stubs are present for multi-resolution image resources, but this is
not fully-baked yet and could use some refinement.
2021-03-11 08:37:35 -05:00
Jeff Young a0b9b0c3ee Improve IsSymbolEditable to differentiate fields.
Fields are editable in Aliases, but still not in Legacy libraries,
locked libraries, etc.

Fixes https://gitlab.com/kicad/code/kicad/issues/7175
2021-02-10 22:57:23 +00:00
Wayne Stambaugh 82cf747ca8 Symbol editor: fix broken pin table dialog OK button disable logic.
Fixes https://gitlab.com/kicad/code/kicad/issues/7122
2021-01-15 09:28:36 -05:00
Electro707 1c42f95ab3 Added visible column to pins table
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6761
2021-01-14 21:03:51 +00:00
Wayne Stambaugh e34756d596 Symbol editor: fix read only dialogs when symbol is from schematic.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6968
2021-01-13 09:40:30 -05:00
Michael Kavanagh 154e19b6e7 Icons: use common prefix for small 16x16 2021-01-02 23:16:33 +00:00
Jeff Young fb7ac450d9 Read-only dialogs for symbols in legacy libraries.
Fixes https://gitlab.com/kicad/code/kicad/issues/5211
2020-12-22 12:16:27 +00:00
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