Commit Graph

6037 Commits

Author SHA1 Message Date
Wayne Stambaugh aab3c936f0 Move headers from common folders to appropriate include folders round 2. 2020-12-17 11:44:03 -05:00
Wayne Stambaugh 08cf9a1e20 Move headers from common folders to appropriate include folders round 1. 2020-12-17 08:12:18 -05:00
Jon Evans a7ea63e610 Hack around broken column sizing in wxGTK 3.0 for hotkey editor
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6767
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6396
2020-12-16 20:51:18 -05:00
Ian McInerney fc20eaa083 Fix some compiler and Coverity warnings 2020-12-17 00:30:22 +00:00
Jeff Young b9b4618c8e Take a stab at fixing the GTK severity heading clipping issue.
Fixes https://gitlab.com/kicad/code/kicad/issues/6766
2020-12-17 00:24:02 +00:00
Ben Dooks 651e7f664d Fix type-cast in page_layout_reader.cpp
The wksFile.Read() call returns a size_t which is then compared
with a int. Make the filelen variable a size_t to make sure it is
of the correct width.

Fixes the following warning:

kicad/common/page_layout/page_layout_reader.cpp: In member function ‘void WS_DATA_MODEL::SetPageLayout(const wxString&, bool)’:
kicad/common/page_layout/page_layout_reader.cpp:853:41: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare]
  853 |     if( wksFile.Read( buffer, filelen ) != filelen )
2020-12-16 10:59:26 +00:00
Seth Hillbrand b7875e4d41 Setup file_* icons
Don't use the same "post_*" icon in the treeview.  The badge gives an
action that doesn't apply in the treeview.

Also renames different file blobs to the "file_*" prefix.
2020-12-15 14:48:09 -08:00
jean-pierre charras 00255f2a9c Fix a compil warning. 2020-12-15 16:20:58 +01:00
Jeff Young c1a74b427a Translucent magnifying glass on footprint & library browser icons.
Also renamed.
2020-12-14 22:15:43 +00:00
Seth Hillbrand 500db27802 Icons: The return of the ladybug
Completely new ladybug icon for the Report Bug menu item.
2020-12-14 10:32:45 -08:00
Marek Roszko e07848d887 Make the footprint preview control bg the same as the preview itself
Fix #5571
2020-12-14 09:48:26 -05:00
Jeff Young 3b35bfc0a5 Don't write out synthetic severities (they're headings).
Fixes https://gitlab.com/kicad/code/kicad/issues/6726
2020-12-14 13:34:53 +00:00
Jeff Young d0e008053a Fix compile issue on OSX. 2020-12-13 23:46:20 +00:00
Jeff Young 126d40f9d3 "Sheet label" too confusing w/ sheet names and fields. Use "sheet pin". 2020-12-13 22:43:09 +00:00
Marek Roszko 8b843d023c Double buffer the info panel
Fix #6721
2020-12-13 13:14:19 -05:00
Michael Kavanagh cc43b66daf Icons: use correct size for open action in toolbar
Previously 16x16 was used
2020-12-13 16:10:26 +00:00
Jeff Young e32686a80b Formatting. 2020-12-13 11:42:03 +00:00
Marek Roszko 7565f60a03 Swap wxFileInputStream/wxFileOutputStream for the buffered kind 2020-12-12 18:52:02 -05:00
Michael Kavanagh dce4d04113 Add 24x24 size refresh icon
Previously 16x16 was being used alongside 24x24
2020-12-12 18:51:55 +00:00
Marek Roszko d67cf2f9af Replace wxFile usage with wxFFile
Buffered libc wxFFile is better thinking about syscall wxFile going wrong.
2020-12-12 13:16:23 -05:00
jean-pierre charras 5d7a6ea990 DIALOG_ABOUT: fix incorrect size of bitmaps: it is now 24x24 pixels
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6716
2020-12-12 18:29:47 +01:00
Marek Roszko 3ae87ba613 Use wxFFileOutputStream in place of previous wxFFile switch
wxFFile with fwrite still has a chance of partial writes.
wxFFileOutputStream provides WriteAll which will iterate until all bytes written or error.
2020-12-12 10:46:30 -05:00
Marek Roszko b4e4e1cf5e Use wxFFile instead of wxFile for saving json settings/json_settings.cpp
wxFile is dangerous, it's ::Write method is a direct map to the write syscall. It does not handle partial writes!
This must be handled in our code which we don't.
2020-12-12 10:00:49 -05:00
Marek Roszko 67d8af4a4f Use buffered file write for hotkeys
Not a important change in the slightest but who knows, it might help someone saving to a network drive
2020-12-12 09:50:52 -05:00
Jeff Young 65f9212f46 Naming conventions. 2020-12-12 03:43:41 +00:00
Jeff Young 42d96fcadc Naming conventions. 2020-12-12 03:43:41 +00:00
Michael Kavanagh cf6f0b9b92 Use trash icon where appropriate 2020-12-11 17:05:11 -08:00
Jeff Young 412c9c8c4e Save should be disabled only if the file is up-to-date.
Any other issues (such as locked files) need to produce a dialog
with info for the user.
2020-12-11 23:58:30 +00:00
jean-pierre charras f26a1a32e0 UNIT_BINDER: better support of DEGREES units (and some fixes).
Especially, add a way to define the number of digits in mantissa.
base_units.cpp: set number of digits in mantissa to 3 instead of 1 for DEGREES
2020-12-11 16:26:58 +01:00
Jeff Young 73b7b104cd Fix some issues with Infobar sizing.
This also commits to the new strategy as it wasn't really compatible
with if-def-ing anymore.
2020-12-11 12:39:40 +00:00
Marek Roszko 0967995a80 Replace wxTextFile for writing fp info cache
wxTextFile uses wxFile which uses write syscalls which means its unbuffered.
This makes file IO more expensive against network shares where it will flush far too aggressively.
wxTextFile is fine for reads however.
2020-12-10 21:34:40 -05:00
Jeff Young 645c49427c Fix hotkey editing on OSX.
Focus was on the dialog instead of the panel.  The dialog doesn't
have the IsUserPanel flag set and so wxEVT_CHAR processing doesn't
happen.  (Why?  I haven't a clue.)

Also fixed some more performance issues with the auto-column-widths.

Fixes https://gitlab.com/kicad/code/kicad/issues/6591
2020-12-11 01:54:39 +00:00
Jeff Young fc57860caf Formatting. 2020-12-11 01:54:39 +00:00
Jeff Young 5888d376a7 Handle special cases for ending overbar text.
Fixes https://gitlab.com/kicad/code/kicad/issues/6695
2020-12-10 18:38:31 +00:00
Jeff Young 98330098ac Yet another overhaul to locking.
This unifies everything under a single architecture with a "don't
show again" dialog.  Since everything now goes through the same
path it should be reasonably easy to make it do whatever we want
in the future.

Right now it presents 3 options: modify only unlocked items, override
locks and modify all items, or cancel command.
2020-12-10 17:36:19 +00:00
Marek Roszko 7fcc2e638c Fix flickering on msgpanel paints 2020-12-09 20:21:51 -05:00
Ian McInerney be4b6ec06a Cleanup compiler warnings 2020-12-09 23:13:33 +00:00
Wayne Stambaugh ec97d1d737 Remove unnecessary decimal point notation test on application start. 2020-12-09 13:53:50 -05:00
Seth Hillbrand c87a1ca17a Allow checkboxes in Windows with/without bitmaps
Fixes https://gitlab.com/kicad/code/kicad/issues/6675
2020-12-08 16:14:22 -08:00
Seth Hillbrand 17d0ad53b4 Update Show DCode icon 2020-12-08 15:14:24 -08:00
Seth Hillbrand 211f9199f8 Remove edit_module in favor of module.svg 2020-12-08 12:22:17 -08:00
Jeff Young fec0a1fbc8 Take II. 2020-12-08 18:43:43 +00:00
Jeff Young ef39711e3e Remove accidentally checked-in debuggin code. 2020-12-08 18:34:34 +00:00
Jeff Young b26a5972c5 LIB_TREE's SetFocus() override no longer getting called.
The KIPLATFORM stuff forces focus, but not through the SetFocus()
call.

Fixes https://gitlab.com/kicad/code/kicad/issues/6657
2020-12-08 17:46:10 +00:00
Jeff Young d1a9efa5fc Try out an animating, obscuring infobar. 2020-12-08 15:05:35 +00:00
Jeff Young b1f0bf7334 More consistent naming. 2020-12-08 13:05:39 +00:00
Marek Roszko abb5cb8310 Fix up msg panel status on save slightly
- pcbnew should use status bar on success like eeschema
- Add a helper to clear msgpanel and set it in one go to avoid redraw delays due to doing processing in between
2020-12-08 00:28:07 -05:00
Ian McInerney 27fa3a422a Restore trace strings in the tool stack
This is a partial revert of d43eefbad5.
2020-12-07 22:03:43 +00:00
jean-pierre charras 413ff4525b DIALOG_CONFIGURE_PATHS: fix issue: html help window never destroyed.
Once the help button is clicked, the html help window is created but never destroyed.
It prevent Kicad to be fully closed
(closing Kicad does not fully close Kicad and leave something like a zombie process)
2020-12-07 10:28:54 +01:00
Jeff Young d0f9503ee0 Add grouping for violation severities.
Fixes https://gitlab.com/kicad/code/kicad/issues/6616
2020-12-06 19:14:48 +00:00
Jeff Young 3e6b658b92 Use stronger language when talking to wx. 2020-12-06 14:57:26 +00:00
Jeff Young 9234745d6d Formatting. 2020-12-06 11:51:14 +00:00
Jeff Young d43eefbad5 Formatting. 2020-12-05 19:44:01 +00:00
Seth Hillbrand 3704c1cdb7 New icons for v6
Fixes https://gitlab.com/kicad/code/kicad/issues/2542
2020-12-05 11:17:15 -08:00
Jeff Young 8781ce7efb Huge performance win for Preferences.
The Hotkey list was recalculating the widths of all columns on
every single cell addition.
2020-12-05 01:19:10 +00:00
Jeff Young 4d3224a9cb Fix off-by-one error when deleting single marker.
Fixes https://gitlab.com/kicad/code/kicad/issues/6625
2020-12-04 14:01:54 +00:00
jean-pierre charras c47871e775 EDA_BASE_FRAME::ShowInfoBarMsg: add option to show a close button.
Same for EDA_BASE_FRAME::ShowInfoBarError and EDA_BASE_FRAME::ShowInfoBarWarning
2020-12-04 14:45:14 +01:00
Seth Hillbrand 0533a23185 Fix/workaround GTK libtree issue with multi-unit symbols
When preparing for clearing the tree, GTK requires walking through
parents.  After calling "Freeze()" to protect against returning bad data
(see #6458 and #4471), we can no longer access Parent() from GTK and the
tree cannot be cleared.

The fix is to collapse the first element if it is open.  This prevents
the common case of the history elements being expanded in the tree

Fixes https://gitlab.com/kicad/code/kicad/issues/6102

(cherry picked from commit 7eea344f91)
2020-12-03 14:39:05 -08:00
Jeff Young e0b4e5135c Tilt real-estate allocation more toward net membership.
Fixes https://gitlab.com/kicad/code/kicad/issues/6601
2020-12-03 15:58:17 +00:00
Jeff Young 599a33a9c6 Make PLEditor greedy selections of rectangles sparse.
Fixes https://gitlab.com/kicad/code/kicad/issues/6278
2020-12-02 23:18:33 +00:00
jean-pierre charras 64f555079a Code cleanup related to zoom:
- remove outdated code or comment coming from old drawing code using wxDC
- move zoom values lists to zoom_defines.h
- fix incorrect zoom max and min values (gal scaling factor limits).
2020-12-02 18:35:28 +01:00
jean-pierre charras 71ab42e60a Minor fixes and cleanup related to zoom definitions.
Mainly move 2 define relative to Zoom from convert_to_biu.h to zoom_defines.h.
Will make some changes/fixes in zoom code more easy.
2020-12-02 10:14:35 +01:00
Jeff Young 4b2d9a5054 Don't draw ruler ticks outside the viewport.
Fixes https://gitlab.com/kicad/code/kicad/issues/6518
2020-12-02 00:29:00 +00:00
Jeff Young df262eaa06 Make prev/next marker work reliably on all platforms.
Requires us to move from arrow-keys to our own commands (the only
way that the OSX wxWidgets impl doesn't eat the keys when the dataVIew
has focus).

While there we might as well add a command to exlucde markers.

ADDED Prev Marker, Next Marker, Exclude Marker

Fixes https://gitlab.com/kicad/code/kicad/issues/6575

Fixes https://gitlab.com/kicad/code/kicad/issues/5501
2020-12-01 22:37:07 +00:00
Jeff Young 3c521942ed Smarten isEmpty checks to include nothing-but-whitespace.
Fixes https://gitlab.com/kicad/code/kicad/issues/6567
2020-12-01 16:39:06 +00:00
Jeff Young 7f8faffa3a Trim down ever-expanding context menu. 2020-12-01 14:04:01 +00:00
Ian McInerney 308ab8cafa Properly scale the ticks for all imperial units on the preview ruler
Fixes https://gitlab.com/kicad/code/kicad/issues/6564
2020-12-01 01:20:28 +00:00
Jeff Young de9d1eb93e Don't write local settings of imported project into current settings.
Fixes https://gitlab.com/kicad/code/kicad/issues/6552
2020-11-30 23:10:21 +00:00
Jeff Young 3a9a6e22bc Fix issues in reporting netclasses.
1) make sure we get the default netclass when we want it
2) escape for HTML (particularly important for "<invalid>", but also
for reporting user rule names, netclass names, etc.)
2020-11-30 14:38:06 +00:00
Jeff Young e09271ca0e Fixes for hole clearance and hole-to-hole tests.
1) Separate out CONSTRAINT types
2) Filter both source and dest pads/vias for drilled holes when doing
   hole-to-hole checks.  We were checking the items being put into the
   DRC RTree, but not the items we were scanning.
3) Add hole clearance to Board Setup Constraints panel.

Fixes https://gitlab.com/kicad/code/kicad/issues/6546

Fixes https://gitlab.com/kicad/code/kicad/issues/4683
2020-11-29 23:35:23 +00:00
jean-pierre charras d3d26f2892 Update the zoom level as soon as it is modified by the mouse wheel
The zoom level displayed on the bottom of the canvas was not immediately
displayed, only after a mouse move.

Fixes #6542
https://gitlab.com/kicad/code/kicad/issues/6542
2020-11-29 17:46:24 +01:00
Jeff Young 3b18fa84bf Null pointer safety (from Coverity). 2020-11-29 10:57:45 +00:00
Jeff Young 056ff36b4b Fix indentation in migrate settings dialog. 2020-11-29 10:57:45 +00:00
Michael Kavanagh b8303a3484 Fix migrate settings dialog ui bug
Fixes https://gitlab.com/kicad/code/kicad/issues/6258
2020-11-29 08:41:15 +00:00
Roberto Fernandez Bautista f2ba9f7ac3 CADSTAR PCB Archive Importer: Correctly load the pad numbers as per the original design
To load the pad numbers correctly we need to also check the PART DEFINITION for each component
2020-11-28 17:18:17 +00:00
jean-pierre charras 005c3b84ad Better fix for incorrect page preview in Page Settings when the worksheet contains a bitmap
The actual size of pixels was incorrectly set.
Fix also bad names for a few vars and methods in BITMAP_BASE.
2020-11-28 10:53:26 +01:00
Jeff Young 896ad4a749 Rewrite PCBNew selection disambiguation based on shapes.
The new shape architecture gives us the opportunity to make text
selection much more intuitive by actually looking at the glyph
shapes.  Before text would be selected when you clicked in the
descenders area (which was usually blank given uppercase letters
and digits).

Fixes https://gitlab.com/kicad/code/kicad/issues/6525
2020-11-27 22:03:14 +00:00
jean-pierre charras 4f651901aa Fix incorrect page preview in Page Settings dialog when the worksheet contains a bitmap 2020-11-27 15:42:27 +01:00
RigoLigoRLC ef75ce9035 Fix: refusal of creation of non-existent directory tree on plotting
Fixed https://gitlab.com/kicad/code/kicad/-/issues/6394
wxWidgets uses wxFileName::Mkdir to create a directory tree like `mkdir
-p`.
2020-11-27 07:24:14 +00:00
Jeff Young fc2bdc49de Once more into the depths of hell... er, I mean fix a focus issue.
So the new steals-focus protection stuff works well when there's a
focused control, but not as well when there's a modal dialog up which
happens not to have a focused control (or worse, a focusable control).

This adds a second mechanism for also checking to see if a modal dialog
is up (something that wxWidgets, true to form, makes very difficult).

Fixes https://gitlab.com/kicad/code/kicad/issues/6520
2020-11-26 16:47:40 +00:00
Jeff Young 2a87980d45 Remove overly verbose messaging. 2020-11-26 16:47:40 +00:00
Jeff Young 94de8ada97 Formatting and naming conventions. 2020-11-26 16:47:40 +00:00
Jeff Young b8414174af Duplicate Eeschema's select-ref-number strategy in PCBNew.
Fixes https://gitlab.com/kicad/code/kicad/issues/6504
2020-11-25 17:13:00 +00:00
Jeff Young f436360196 Consistency in capitalization and plurality. 2020-11-25 17:13:00 +00:00
Ian McInerney d50d728d19 Cleanup compiler warnings 2020-11-25 00:08:09 +00:00
Jeff Young 9c7c05c161 Mostly formatting cleanup but a few type-casting cleanups too. 2020-11-24 22:16:41 +00:00
jean-pierre charras 696fc7e46e Fix a minor issue in PANEL_SETUP_NETCLASSES, when resizing it. Second attempt.
If a class name choice widget is selected, resizing the panel does not
move the opened widgets, until it is closed.

Fixes #6474
https://gitlab.com/kicad/code/kicad/issues/6474
2020-11-24 17:03:48 +01:00
Jeff Young dbc7831d0c Potential fix for recursive error crash.
Fixes https://gitlab.com/kicad/code/kicad/issues/6471
2020-11-24 13:48:33 +00:00
jean-pierre charras 1b7bfa2424 Revert "Fix a minor issue in PANEL_SETUP_NETCLASSES, when resizing it."
This reverts commit 52d8b70d3a.
The fix creates on Linux a serious issue
2020-11-24 14:36:12 +01:00
jean-pierre charras 52d8b70d3a Fix a minor issue in PANEL_SETUP_NETCLASSES, when resizing it.
If a class name choice widget is selected, resizing the panel does not
move the opened widgets, until it is closed.

Fixes #6474
https://gitlab.com/kicad/code/kicad/issues/6474
2020-11-24 11:29:37 +01:00
Jeff Young 78b505f36a Count head and tail lists as well.
Fixes https://gitlab.com/kicad/code/kicad/issues/6461
2020-11-23 23:54:54 +00:00
Seth Hillbrand 298bc13f5d Delay deletion of the RC_ITEM tree nodes
The wxWidgets call "ItemDeleted" still requires access to the item in
memory, so we delay deletion by storing removed items to the end of the
call

Fixes https://gitlab.com/kicad/code/kicad/issues/6301
2020-11-23 09:52:46 -08:00
jean-pierre charras 064ebd4dc8 Minor fix for include files. 2020-11-23 11:43:22 +01:00
qu1ck b32c2a6c90 Refactor EDA_TEXT::TransformToSegmentList() to return a vector of points
This allows reading text object as it is rendered through python API.
2020-11-23 07:50:54 +00:00
Jeff Young e761df17f5 Netnames are case sensitive.
Fixes https://gitlab.com/kicad/code/kicad/issues/6460
2020-11-23 01:10:08 +00:00
Jeff Young c1b94f9ebf Handle escaped netnames better.
Fixes https://gitlab.com/kicad/code/kicad/issues/6404
2020-11-22 18:20:13 +00:00
Jeff Young 3a4bd6fb8b Fix uninitialized variable. 2020-11-21 20:57:36 +00:00
Jeff Young 1391774f64 Re-factor boundary/courtyard checker error handling.
ADDED Footprint Checker dialog to display the results in.

Fixes https://gitlab.com/kicad/code/kicad/issues/6446
2020-11-21 20:57:35 +00:00
jean-pierre charras 64636601b8 Eeschema: fix a Unicode/UTF8 management when pasting items from Clipboard.
Copy to clipboard save items (using S expr description) using wide strings
(not UTF8 encoding).
But Paste from clipboard was not converting the wide string to UTF8 string
when getting the stored data to send it as std::string to the S expr reader.

Fixes #6449
https://gitlab.com/kicad/code/kicad/issues/6449
2020-11-21 10:59:25 +01:00
Jeff Young 0a7ef25453 Replace STROKE_FONT performance fix, this time with correct type.
Also this time with a fixed Cairo implementation and an implemented
BASIC_GAL implementation.

Fixes https://gitlab.com/kicad/code/kicad/issues/6447
2020-11-20 11:24:52 +00:00