Commit Graph

521 Commits

Author SHA1 Message Date
Jeff Young b7f0aae006 Nullptr safety for UI Conditions.
We don't really control when these are called, so best not to assume
we've finished initialization of the frame/screen/document/whatever.

Possible fix for KICAD-KY.
2023-06-12 12:38:50 +01:00
Jeff Young aa8a903940 Cleanup. 2023-06-12 11:14:27 +01:00
CraftedNightmare d94e9b31b1 Fix Search pane not remembering docking sizes and positions
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14120
2023-06-11 20:23:24 +00: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 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 521aa5b5ae Update DRC exclusions model to match terminology.
DRC exclusions were originally written following the C++
pragma model (ie: allow this violation here).  However, the
"exclusion" terminology we used in the GUI suggests a model
model where the exclusions go away when the violation no
longer exists.

Fixes https://gitlab.com/kicad/code/kicad/issues/14351
2023-04-15 12:18:41 +01:00
Jeff Young 374d3d52ef Rollback wxChoice -> wxComboBox changes for now.
wxComboBox still has serious issues on macOS.

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

Fixes https://gitlab.com/kicad/code/kicad/issues/14413
2023-04-09 23:00:33 +01:00
Jeff Young bbd6c80507 Collapse FP_* down into their PCB_* equivalents. 2023-03-31 22:57:46 +01:00
Seth Hillbrand 7695d510d6 Prevent PCB Editor from opening multiple board_setup
ShowBoardSetup can be called multiple times from multiple locations,
resulting in duplicate board setup dialog boxes.  This is confusing and
should be prevented.  We use the established patter from the symbol
picker to ensure that only one copy of the dialog is ever opened at a
time
2023-03-30 15:34:23 -07:00
Jeff Young 2443bc6e29 Update allow-solder-mask-bridges when updating footprint from library.
Fixes https://gitlab.com/kicad/code/kicad/issues/14422
2023-03-26 16:27:09 +01:00
Wayne Stambaugh 66f6168163 Fix mode-less dialog issues.
Don't assume the dialog is mode-less and call Destroy() from within a
dialog method.  This will most assuredly crash if the dialog is shown
modally or quasi-modally.

Don't leak memory for mode-less dialogs created on the stack.  Make sure
when the parent frame window is closed that all mode-less dialog memory
is cleaned up.  Dialogs are not child windows like controls and toolbars
so their memory does not automatically get cleaned up when the parent
window is destroyed.

Do not directly access frame parent window's pointer in dialog destructors.
Apparently the tear down order when destroying mode-less dialogs is not
guaranteed so the parent window may get deleted before the dialog causing
a crash when accessing the parent window pointer from the dialog dtor.

Do not close mode-less dialogs in the parent frame's destructor.  This
doesn't guarantee that the dialog(s) will be destroyed before the parent
but it may reduce some careless mode-less dialog event handling in the
future.
2023-03-13 12:04:01 -04:00
Jeff Young dc78797274 Support SHEET_PATH when printing.
Fixes https://gitlab.com/kicad/code/kicad/issues/14233
2023-03-12 22:24:06 +00:00
Seth Hillbrand d2cc252fc7 Move via/track/grid selection widget to wxComboBox
The wxComboBox drops nicely from the top of the screen, showing the full
element list, opposed to the choice widget that centers the selection
and places the list off the top of the screen if there are many
elements.  This was broke for MacOS until wx3.2

Fixes https://gitlab.com/kicad/code/kicad/issues/1866
2023-03-09 11:45:44 -08:00
Jon Evans 610e787ada Move to requiring explicit action to save project settings 2023-03-04 14:25:07 -05:00
Mike Williams 4b07e3e413 Common Actions: Find Previous
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/8968
2023-02-14 08:21:37 -05:00
Jeff Young 362d85ef50 Special selection mode when in high-contrast with courtyard layer active.
Fixes https://gitlab.com/kicad/code/kicad/issues/13521
2023-02-11 21:11:07 +00:00
Jeff Young 13391176ae Remove DRC exclusions that no longer have items.
Fixes https://gitlab.com/kicad/code/kicad/issues/13802
2023-02-11 20:43:00 +00:00
jean-pierre charras 8ce0a84ca7 Fix compatibility with older wxWidgets versions.
Fix also a compil warning
2023-02-03 08:24:38 +01:00
Simon Richter 05198b896f Move PCB_EDIT_FRAME::ExchangeFootprint to pcb_edit_frame.cpp
No idea why it was in the dialog file, but there is no good reason for that.
2023-01-24 12:54:05 +00:00
Jeff Young b0ec006b81 The safety of running the event loop during doCloseWindow is debatable.
(Possibly a fix for Sentry KICAD-7T.)
2023-01-24 11:33:08 +00:00
Seth Hillbrand 7e5a2450b8 Move multiple wxMessageBox to DisplayErrorMessage
Also provide protection for headless running in multiple callsites

Fixes https://gitlab.com/kicad/code/kicad/issues/13575
2023-01-18 16:54:01 -08:00
Seth Hillbrand f35a02d57a Move early exit higher in netname redraw
If the track is outside of the viewbox, GetLOD returns HIDE.  This needs
to be handled quickly in the loop before further processing

Fixes https://gitlab.com/kicad/code/kicad/issues/13572
2023-01-17 15:56:04 -08:00
Marek Roszko ac94995f70 Some more wxS 2023-01-16 19:07:50 -05:00
Jeff Young f0b2902b8c Don't allow quit while zone filler is running.
Fixes https://gitlab.com/kicad/code/kicad/issues/13551
2023-01-16 16:01:45 +00:00
Mike Williams 1ba9a6abe3 Rotate/Mirror: unbreak immediate mode actions 2023-01-03 16:05:52 -05:00
jean-pierre charras e8114dc49a Minor compil and Coverity warnings fixes. 2023-01-02 10:21:42 +01:00
Gary Kim 8e8a3c7bdc
Do not translate name in version info
Leave the application name in version info untranslated when
viewed, copied, or used in a bug report.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13298
2022-12-31 20:28:45 -05:00
Jeff Young 4c63b4e061 Class name <-> file name sync. 2022-12-29 18:05:57 +00:00
Mike Williams 0c415a7190 PCB Editor: make rotate menu bar items conditional on selection items 2022-12-28 13:33:35 -05:00
Mike Williams 741d1e043a PCB Editor: make Mirror menu items conditional
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13230
2022-12-27 14:18:47 -05:00
Jeff Young 5dce8323e8 KIGFX::REPAINT is not enough if the item isn't in the view.
Fixes https://gitlab.com/kicad/code/kicad/issues/11656

Fixes https://gitlab.com/kicad/code/kicad/issues/13217
2022-12-24 17:18:22 +00:00
Jon Evans 1590e48ec1 Use translated strings for property display 2022-12-21 18:03:15 -05:00
Mike Williams 5d94d2634e PCB Editor: make locking menu items conditional
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/5202
2022-12-21 10:34:54 -05:00
Jon Evans 72939e8918 Properties: enable in PCB editor for everyone
Leaving the AC flag around for future use in the footprint editor etc

Fixes https://gitlab.com/kicad/code/kicad/-/issues/2039
2022-12-08 17:38:36 -05:00
Jon Evans 33d76f63b0 Properties: save and restore splitter position 2022-12-07 21:38:33 -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
Jeff Young 96819f6c01 Better cache invalidation for text objects with references.
Fixes https://gitlab.com/kicad/code/kicad/issues/13059
2022-12-04 11:51:44 +00:00
jean-pierre charras 497b368006 Pcbnew menubar: View/Drawing Mode/Sketch Text Items and Skecth Graphic Items:
Handle the Checked/Unchecked bitmap symbols of these 2 submenus.
2022-12-03 11:03:14 +01:00
Jeff Young 3501ad1b4d Record layer for starved thermal exclusions. 2022-12-01 18:04:34 +00:00
Jeff Young 19eab62516 More safety around ratsnest state.
Fixes https://gitlab.com/kicad/code/kicad/issues/13011
2022-11-30 13:00:21 +00:00
Jeff Young b6bd74d822 Replace single zone fill under "draft" terminology.
Also sets Autofill Zones to default to on.
2022-11-29 18:13:36 +00:00
Jeff Young b2177718a1 Tighten up refresh logic for net & netclass references.
Also tightens it up a bit for text variables which can reference things
like netnames and netclasses, but also board settings.

Fixes https://gitlab.com/kicad/code/kicad/issues/13032
2022-11-29 15:18:36 +00:00
Jon Evans 64f315c649 Move properties panel to widgets with the other AUI panels 2022-11-27 22:40:23 -05:00
Jon Evans bbea5b3fbc Save and restore properties and search panel sizes 2022-11-25 09:11:30 -05:00
Jeff Young 97fd99ec99 Re-resolve netclasses after assigning netclass to pattern.
Fixes https://gitlab.com/kicad/code/kicad/issues/12965
2022-11-22 14:54:08 +00:00
Jeff Young be29ab2c76 Need to check enabled as well as visible.
Fixes https://gitlab.com/kicad/code/kicad/issues/12786
2022-11-06 19:53:57 +00:00
Seth Hillbrand c1f2ca1d8d Make multiple names of the net on a track
Rather than moving the netname around, we want to keep the correct
number of netnames on a track such that there is always at least one
displayed on long tracks even when panning.

This reduces calculation time while keeping the netnames visible

Fixes https://gitlab.com/kicad/code/kicad/issues/12436
2022-11-04 11:49:50 -07:00
Seth Hillbrand c95bd3fc89 Cache LOD for netname redraw
When panning, we should only redraw the netnames when they come into
view or go out of view.  Caching the LOD provides this preventing
unneeded redraws while still redrawing on zoom changes

Fixes https://gitlab.com/kicad/code/kicad/issues/12436
2022-11-03 13:50:12 -07:00
Wayne Stambaugh d78b41969f Fix broken autosave when board is modified.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12700
2022-10-22 15:49:03 -04:00
Jeff Young 4633d251a5 Remove single-zone-fill and unfill.
These are incompatible with our zone-priority-based algorithms.
2022-10-18 13:45:28 +01:00