Commit Graph

8481 Commits

Author SHA1 Message Date
Seth Hillbrand 48ecd742eb Maintain file permissions when renaming
Temporary and autosave files do not neccessarily have the correct
permissions set to replace existing project files.  This updates the
permissions to match the existing values where possible

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13574
2023-05-24 17:09:38 -07:00
Seth Hillbrand 122be418bb Upgrade file locking
wxSingleInstanceChecker is meant for running programs, not file locking.
This implements an RAII class for file locking that stores the lock
files next to the file being locked, allowing it to be easily found and
removed.  Also includes the ability to override the lock, with
information about the original owner

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14734
2023-05-24 13:51:54 -07:00
Jeff Young 1057483983 Reset button applies to resolved page, not lazy page holder.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14786
2023-05-21 18:15:21 +01:00
Jeff Young cbf83c4161 Pin preferences dialog size.
While unfortunate (we generally frown on having fixed sizes in
favour of having everything auto-layout), in this case it's a
cost of lazy-loading the panels.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14785
2023-05-21 11:17:36 +01:00
Jeff Young d4c9d9d60a Fix issue with colours in the new lazy-loaded preference panels.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14784

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14782
2023-05-21 10:56:21 +01:00
Jon Evans 902913c7dd Fix infobar height in Windows HiDPI situations 2023-05-20 21:57:08 -04:00
Wayne Stambaugh 24b04795fd Add net navigator panel to schematic editor.
[ADDED]: A panel to the schematic editor  that allows quick access to all
         of the items connected to the currently highlighted net.

This is an initial swag at implementing a full net navigator feature.  For
now it only shows the currently highlighted net nodes.  The incremental
net list advanced setting must be enabled in order to use this feature due
to performance reasons.  There are still some issues with saving the panel
position which will be addressed in the future.

Initial code for serializing wxAuiPaneInfo settings to and from JSON have
be implemented.
2023-05-20 13:48:03 -04:00
Jeff Young 4c59365867 Blind attempt to fix pns-debug-tool linking issue. 2023-05-19 19:26:03 +01:00
Jeff Young 8b1fd62d35 Make pad & via teardrops 1st-class citizens (props of the pad/via)
Change teardrop generation to rely more heavily on BOARD_CONNECTIVITY
for improved performance.

Add updating of teardrops on BOARD_COMMIT::Push().

Also converts m_CopperItemRTreeCache to std::shared_ptr.
We don't copy it around anyway, and having to create a new set
of std::unique_ptr's for each operation is likely to be more
expensive than std::shared_ptr's overhead.
2023-05-19 18:02:03 +01:00
Jeff Young 329025f8a7 Update "simple" MRU paths in project Save As.
Update only those that are the project name + extension.

Fixes https://gitlab.com/kicad/code/kicad/issues/14681
2023-05-19 18:02:02 +01:00
Marek Roszko 573b66d243 Fix a bunch of C5266 warnings (pointless const on bool/int returns)
warning C5266: 'const' qualifier on return type has no effect
Microsoft doesn't even document C5266
2023-05-18 21:35:06 -04:00
Seth Hillbrand 0de24bfd59 Cleanup text alignment between version 6 and 7
Version 7 text alignment changed subtly for stroke fonts from version 6.
Additionally, the output has been different between screen and plotting,
leading to offset text in plotted output relative to the text shown on
screen.

This introduces a fudge factor in FONT::getLinePositions to correct the
offset in the plotting output relative to v6.

This also changes the SCH_PAINTER and PCB_PAINTER to correct the
relative offsets between GAL and PLOTTER classes.  The source of these
offsets is atm unclear.

Fixes https://gitlab.com/kicad/code/kicad/issues/14755
2023-05-17 13:33:49 -07:00
Ian McInerney 20ec8ed303 Fix GitLab URLs to point to the correct project page
GitLab 16.0 removes support for URLs that don't contain /-/ after the
repository name, so the report bug feature and various links we had in
the source (including the git-fixes script) would lead to a 404 error.

See GitLab docs for deprecation/removal notice:
https://docs.gitlab.com/ee/update/deprecations.html?removal_milestone=16.0#legacy-urls-replaced-or-removed

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/14759
2023-05-17 11:23:00 +01:00
Seth Hillbrand 72267cf9b0 Adjust stroke font output to match v6 output
Many minor tweaks were added that changed the output of the stroke font
from v5/v6.  These offsets changed the gerber output expected.  This
reverts the changes to something much closer to the v6 output.  It is
not pixel-perfect but gets very close on most texts.

Fixes https://gitlab.com/kicad/code/kicad/issues/14609
2023-05-12 12:40:41 -07:00
Alex f7f15e1ddf Prevent axes settings from affecting angles in properties panel.
Fixes https://gitlab.com/kicad/code/kicad/issues/14168
2023-05-12 15:44:37 +03:00
Alex efbd360440 Fix double negative signs in mask/paste margin overrides. 2023-05-12 15:44:37 +03:00
Jeff Young ddc6ecf7be Lazy loading of Schematic Setup panels. 2023-05-11 11:43:10 +01:00
Marek Roszko dd8dc4e513 Add a sequential read flagged fopen helper
Trying to squeeze out some kind of gain by informing the OS we will read a file sequentially.
In particular our FILE_LINE_READER just uses fgetc until the end
2023-05-10 20:24:27 -04:00
Jeff Young 9ae8255202 Insta-prefs. 2023-05-10 18:14:14 +01:00
Jeff Young 6bf43588bb Don't store sizes in panels. Let them auto-lay-out. 2023-05-10 18:14:14 +01:00
Marek Roszko 5d93487607 Disable IME input on the gal canvas
Fixes #9719
2023-05-09 20:30:15 -04:00
Jeff Young e1db4e0694 Add backspace modifier handling to SCINTILLA_TRICKS.
Fixes https://gitlab.com/kicad/code/kicad/issues/13910
2023-05-08 18:42:04 +01:00
Jon Evans 09e8f72196 Don't try to open files multiple times
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14703
2023-05-07 21:46:39 -04:00
Marek Roszko 5dcc221950 Use _fgetc_nolock with msvc 2023-05-07 12:33:33 -04:00
Marek Roszko b92f62337f Change the spacemouse driver flag to true for windows by default 2023-05-07 12:12:20 -04:00
Marek Roszko c7eaef2d13 Add missing footprint load progress, usually in schematic editor 2023-05-07 10:46:39 -04:00
Jon Evans 2ab47ee1e9 Allow for settings to be added during load
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14691
2023-05-07 08:48:07 -04:00
Jeff Young 8bd21edd8a Fix capitalization of text vars for Eagle importer.
Also fixes the test gold files to expect the correct variable
references.
2023-05-06 23:49:10 +01:00
Jeff Young 8fe02ee83c Handle Eagle user-defined attributes.
(We map these to text variables.)

Fixes https://gitlab.com/kicad/code/kicad/issues/13798
2023-05-06 21:10:34 +01:00
Jeff Young 995388fb71 Rewrite linebreaking algorithm.
Previous version was overly simplistic to deal correctly
with multiple spaces or textruns not separated by spaces.

Fixes https://gitlab.com/kicad/code/kicad/issues/14683
2023-05-05 22:32:40 +01:00
Jeff Young b41d446f58 Fix a bunch more issues with sheetpaths and allowExtraText.
A sheetpath is required to correctly resolve text variables.
Depending on currentSheet is rife with bugs.

There are many places where we do *not* want to be prepending
field names to the field values, such as netlisting,
building PDF hypertext menus, etc.

Also, Find/Replace needs to work on unresolved text, as
that's what we're going to display (and if replace nuked
your variable references you wouldn't be happy).
2023-05-05 17:23:52 +01:00
Jeff Young 7eb099187d Pass aEvent by value.
It will have changed by the time CallAfter() is executed.

Fixes https://gitlab.com/kicad/code/kicad/issues/12475
2023-05-03 12:29:06 +01:00
qu1ck f840fe3d38 Fix PCM update indicator color 2023-05-02 11:33:41 +00:00
jean-pierre charras 7691cd9509 LIB_TREE: fix an issue when using the popup menu:
- At least on wxWidgets 3.2 GetPopupMenuSelectionFromUser() returns the submenu
id, not the submenu idx from 0
- wxID_NONE can be returned when clicking outside the popup menu, or cancel.
2023-05-02 12:40:20 +02:00
Jeff Young df7d62fdd3 Added a sort-order dropdown to lib-tree filters.
Also simplifies the scoring algorithm so that it only
differentiates between exact-match, match-at-start and
any-match.  The rest of the position-based matching
stuff is gone, as is the knowledge of the name vs the
keywords vs the description.  All that is left to the
provider of the weighted search terms array.
2023-05-01 21:26:43 +01:00
Mike Williams 04a53ea40d Picker Tools: make sure we know what tool we are
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/14621
2023-05-01 12:43:09 -04:00
Jeff Young 2f9889ff62 Add settings for plotting PDF property popups.
Fixes https://gitlab.com/kicad/code/kicad/issues/14450
2023-04-30 18:10:04 +01:00
Jeff Young a3b741a126 Extend Mac colour picker cursor fix to GTK. 2023-04-30 13:48:13 +01:00
Jeff Young bc754df30f Go back to winner-takes-all lib-tree scoring algorithm.
(Because we sort alphabetically there's no way to see
what the second-highest scored item was.)
2023-04-30 13:01:09 +01:00
Jon Evans dc847db19d Add initial support for database library settings UI
For now, just for diagnostic purposes (settings changes are not preserved)
2023-04-29 18:15:00 -04:00
Jeff Young 08c773a0bf Use wxFileName to resolve . and .. in documentation paths.
Fixes https://gitlab.com/kicad/code/kicad/issues/14564
2023-04-29 17:52:11 +01:00
Jeff Young a817b4c1ff Don't reset alpha when specified in hex value.
Also fixes a bug with colour picker cursor drawing on Mac.

Fixes https://gitlab.com/kicad/code/kicad/issues/14646
2023-04-29 17:52:11 +01:00
Seth Hillbrand f4b43617e7 Add COMMIT structure to Schematic and Symbol editors
Provides a single-point access for modifying the schematic and symbol
elements that allows chaining updates and reverting partial changes.
Standardizes the undo hierarchy between pcb and schematic editors

As this is another layer on the existing undo/redo structure, the
initial commit does not replace all undo/redo calls currently existing.
These will be handled in a series of follow-on commits
2023-04-28 17:05:47 -07:00
Jeff Young 5b56cb6bdb Don't let add-row processing intercept OK processing.
Fixes https://gitlab.com/kicad/code/kicad/issues/14579
2023-04-26 12:47:55 +01:00
Jeff Young 69500bfcaa LTSpice schematic import based on the work of Chetan Shinde. 2023-04-24 13:52:52 +01:00
Jeff Young c381b6d024 More robust file reading for simulator files. 2023-04-24 13:52:52 +01:00
jean-pierre charras 31b30cef96 OPENGL_GAL: draw BITMAP_BASE: fix incorrect rendering of mirrored bitmaps
The vertical mirror was not working.
2023-04-23 16:00:05 +02:00
jean-pierre charras f47f44350d BITMAP_BASE::Mirror() and ::Rotate(): fix an issue for bitmaps with ppi not 300
wxImage::Mirror() and wxImage::Rotate() transforms clear some parameters, especially
the PPI stored in the image. It creates bad size (bad ppi) when saving a BITMAP_BASE
in files.
These parameters are now restored after transform.
2023-04-23 11:30:02 +02:00
jean-pierre charras c617abe8e9 SCH_BITMAP and PCB_BITMAP: rename m_image to m_bitmapBase. Add more info
in GetMsgPanelInfo() (PPI, scale).
m_image name was confusing: it is not a wxImage, but a BITMAP_BASE item,
and m_image name was already in use in BITMAP_BASE, used inside SCH_IMAGE.
Bitmap properties dialog: show PPI value and add Title to dialog.
2023-04-22 17:28:06 +02:00
Marek Roszko 53ad203028 Guard the new sentry calls because it won't be initialized if opted out 2023-04-20 23:05:06 -04:00