Commit Graph

789 Commits

Author SHA1 Message Date
Seth Hillbrand 1cc9792cdb Fix snapping dist when disabling grid
The disable grid hotkey should allow the snap scale to be completely
determined by the snapSize and world scale.  This prevents snapRange
from overriding in the case where grid is disabled.

Additionally, we disallow grid snapping when the grid scale is not
visible.  This means that when zoomed out sufficiently to not show the
minor ticks, these minor ticks will not override a snap

Fixes https://gitlab.com/kicad/code/kicad/issues/12303
2022-12-21 17:47:45 -08:00
Mike Williams 756db0d542 Schematic: fix selection disambiguation not changing highlighted item
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13103
2022-12-14 10:08:19 -05:00
jean-pierre charras f76811471e Avoid an annoying compil warning with GCC 12.2 2022-12-10 14:48:47 +01:00
Mike Williams a417aa6e69 Selection: provide disambiguate for deselections of multiple items
Don't assume we're a delayed drag if the user is using selection
modifers.
2022-12-08 14:12:12 -05:00
Mike Williams 0e75bf02fa Selection: refactor modifier checking 2022-12-08 14:12:12 -05:00
Alex 6d513e7ecf Expose changing arc edit mode in arc button context menu and Preferences
Ctrl+Space can still be used to cycle through modes.

Fixes https://gitlab.com/kicad/code/kicad/issues/5412
2022-12-05 21:28:16 +03:00
Seth Hillbrand 7b1702b5fb Use IsType() for selection testing
Straight Type() comparison breaks for the TYPE_LOCATE values
2022-11-21 05:02:06 -08:00
Jeff Young bc271a8d15 Protect move tool from re-entrancy.
m_dragInProgress is usually sufficient, except when we haven't started
one yet.  In any case, conflating the two is probably a bad idea.

Fixes https://gitlab.com/kicad/code/kicad/issues/12936
2022-11-18 17:08:38 +00:00
Jeff Young c409646aad Update message panel after rebuilding connectivity.
Fixes https://gitlab.com/kicad/code/kicad/issues/10122
2022-11-18 15:29:16 +00:00
jean-pierre charras 9501f4303d Rename CreateWindow to CreateKiWindow to avoid a collision name with a windows header
No code change, but it fix an issue specific to msys2 that bother me when
trying to fix issues with wx 3.0.x version
2022-11-08 12:31:07 +01:00
Jeff Young ae741b93e6 Resore push/pop-less PickerTool.
(Functionality was accidentallly lost when we removed the opt command
strings.)
2022-11-07 19:11:12 +00:00
Jeff Young 19d270fe74 Text size sanity checking for TEXT_ITEMS_GRID.
Oh dear, there was a bunch going on here.  Firstly the move from int
to long long int for ValueFromString() means that we were no longer
catching overflows (as we were C-style casting it back to int in many
places).  But even when the overflow is caught, it would run in to
wxWidgets' empty string bug while trying to log it.

Fixes https://gitlab.com/kicad/code/kicad/issues/12577
2022-10-06 13:19:08 +01:00
Seth Hillbrand b716afd6f1 Clarify various uses of "Center"
Distinguish between the english verb "Center" and the noun "Center",
which may be translated differently

Fixes https://gitlab.com/kicad/code/kicad/issues/11109
2022-10-03 12:48:57 -07:00
Seth Hillbrand 46016cfc61 Remove duplicated text in Report Bug
Now that GitLab insists on inserting this text, we shouldn't duplicate
it in the Report Bug action

Fixes https://gitlab.com/kicad/code/kicad/issues/10939
2022-10-03 11:12:50 -07:00
Jeff Young 2422b9a7c8 Simplification, formatting, and spelling. 2022-10-03 18:42:50 +01:00
Jon Evans 375b530dad ADDED: Column selection and reordering in symbol chooser 2022-09-25 22:49:49 -04:00
Marek Roszko 8e96751af2 Strip out and migrate 3d search paths in favor of env vars
This mainly stops reading/writing 3dresolver.cfg
We still keep some sillyness for kicad2step for now

Fixes https://gitlab.com/kicad/code/kicad/-/issues/9164
2022-09-25 21:29:52 -04:00
Marek Roszko 2490ad1458 Fix search panel not remembering visibility
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12494
2022-09-25 11:56:41 -04:00
Ian McInerney 3a297093e6 Fix lambda capture in ACTION_TOOLBAR 2022-09-25 15:41:39 +01:00
Jeff Young 7fe3999457 Fix a bit of fall-out from making command strings non-optional. 2022-09-20 00:08:12 +01:00
Jeff Young 64a6fc0fd4 Push UNITS_PROVIDER down into a low-level mixin.
This allows us to also construct cheap UNIT_PROVIDERs for specific
tasks when necessary.
2022-09-19 17:10:59 +01:00
Mike Williams 9304607624 TOOL_EVENT: make command string non-optional
We're getting segfaults in places where this isn't checked. Also, add
some asserts so we can catch bad tool push/pop.

Removes all uses of GetCommandStr() and makes it private.
2022-09-19 10:23:09 -04:00
Mike Williams b7ba24b2d9 TOOL_EVENT: fix lifetime issues with const aEvent& refs
Without this the event is on the stack, and as soon as the tool calls
Wait(), the event will be deallocated. The aEvent reference will then
point to invalid memory.
2022-09-19 07:59:11 -04:00
Jeff Young 45d6b4a9fc Readability improvements. 2022-09-19 11:18:20 +01:00
Mark Roszko b00178adb3 Nuke base_units from orbit 2022-09-16 04:38:10 +00:00
lulu731 0180bcf90a ADDED: Implement Drag and Drop
dropping files to Kicad manager :
  *.kicad_pro, *.pro -> open project;
  gerber and job files -> open in Gerbview editor;
  Eagle and Cadstar files -> open project.
dropping file to schematic editor -> append schematic;
dropping library file to Symbol editor -> add library;
dropping board file to PCB editor -> append board;
dropping library or footprint file to Footprint editor -> add library or import footprint;
dropping ZIP file or gerber files to Gerbview editor -> open files;
dropping sheet file to Drawing Sheet editor -> open sheet.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/11638
2022-09-14 22:28:09 +00:00
Mark Roszko f304e2d4f6 ADDED: Search/inspect pane 2022-09-14 02:59:57 +00:00
Mike Williams 9cda5e200c Hotkeys: Swap on Shift S and revert old actions back to S 2022-09-12 14:18:54 -04:00
Mike Williams f70e1d0f22 SCH/PCB: Set Swap hotkey to 'S'
* Move Add Sheet to Shift+S in Schematic Editor
* Move Set Grid Origin to Shift+S in PCB Editor
2022-09-12 11:11:49 -04:00
Mike Williams fcfb9cc5ad Selection: track selection order 2022-09-12 09:39:43 -04:00
Jeff Young d5430906d4 Make sure cursor settings get saved.
Fixes https://gitlab.com/kicad/code/kicad/issues/11663
2022-09-10 18:43:32 +01:00
Jeff Young efae2bbb4c Better feedback for netclass assignment patterns. 2022-09-03 21:33:56 +01:00
Jeff Young c30a557810 ADDED netclass assignment from PCB canvas.
Fixes https://gitlab.com/kicad/code/kicad/issues/5975
2022-09-03 19:29:59 +01:00
Jeff Young 9188838e50 RIP EDA_RECT. 2022-08-31 23:57:24 +01:00
Jeff Young 5679b9dbdc Remove a few EDA_RECT instances. 2022-08-31 01:22:49 +01:00
Seth Hillbrand b736460e71 Move optional access from value() to *operator
`value()` throws.  Where we check for existence, we don't need to use
the throwing version and should just use the unprotected variant
2022-08-30 13:59:39 -07:00
Seth Hillbrand 91fbb5c957 Don't prevent immediate actions while router active
Immediate actions that can take place are useful.  We should only be
preventing immediate actions while actively routing or dragging

Fixes https://gitlab.com/kicad/code/kicad/issues/12311
2022-08-30 10:31:29 -07:00
Seth Hillbrand f1261e71d4 Replace boost::optional with std::optional 2022-08-25 15:50:47 -07:00
Alex 3a76d42630 Cross-probing/selection for multiple items (PCB -> SCH)
Fixes https://gitlab.com/kicad/code/kicad/issues/10469
2022-08-22 19:33:39 +00:00
Jeff Young 4f0136db3b Attempt to fix std::initializer_list lifetime issue. 2022-08-21 20:54:41 +01:00
Jeff Young aa2ad3b44c Move KICAD_T[] to std::initializer_list<KICAD_T>. 2022-08-20 10:28:11 +01:00
Jeff Young 51b905ba32 Move Configure Paths help inside dialog.
This allows us to switch back to a standard modal dialog (instead of
quasi-modal, which has problems with Ctrl-V in a search box inside a
standard file dialog -- such as when picking a path).

Fixes https://gitlab.com/kicad/code/kicad/issues/9473
2022-08-07 11:28:16 +01:00
Jeff Young 5c9aed62aa Use wxWidgets IDs for cut/copy/paste.
This allows them to work in places like search boxes in standard file
dialogs.  If wxWidgets doesn't find the standard IDs in our menus
then it won't enable them.
2022-08-07 11:28:16 +01:00
Jeff Young 6f49b57f9b Cleanup & performance enhancements. 2022-08-01 13:09:51 +01:00
Jeff Young 6e0d31b812 Improve grid tooltip.
Fixes https://gitlab.com/kicad/code/kicad/issues/9841
2022-07-27 12:29:01 +01:00
jean-pierre charras 993c446fdf Fix some warnings detected by PVS-STUDIO (most are not used vars) 2022-07-25 18:23:52 +02:00
Jeff Young e5a664c6b3 Try a slightly different tack for cancelling net highlighting.
Fixes https://gitlab.com/kicad/code/kicad/issues/12029
2022-07-19 10:31:49 +01:00
Seth Hillbrand db4f2d9dd8 Catch some crashes on shutdown
These can happen when a tool is active that sends signals when exiting
(e.g. deselectEvent).  These may be caught by the active loop in another
tool which might try to update the UI after it has been freed.  By
marking all tools as "shutdown", the only event returned to them should
be null.  As an extra precaution, we flag the shutdown globally within
the tool manager and check this flag before launching either events or
new tools

Fixes https://gitlab.com/kicad/code/kicad/issues/10698
2022-07-15 16:56:01 -07:00
Seth Hillbrand b5bf1da251 Keep track of blocking windows
Allows the calling KiWAY player to send messages to the blocking window
before signaling a separate call

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

Fixes https://gitlab.com/kicad/code/kicad/issues/11772
2022-07-13 19:25:24 -07:00
Jeff Young 57acce9e55 Share more code between selection tools. 2022-07-11 19:04:08 -06:00