Commit Graph

112 Commits

Author SHA1 Message Date
jean-pierre charras 93b5038382 FOOTPRINT_EDIT_FRAME: ensure the canvas type comes from the FOOTPRINT_EDITOR_SETTINGS config
Previously, although the fp editor preferences has an option to select the canvas type,
it was read from the the PCBNEW_SETTINGS config, using Kiface().KifaceSettings().
2023-10-26 17:58:33 +02:00
Jon Evans 47e25d617e ADDED: Icon scaling for toolbars only
Unlike the old "icon scale" (that actually scaled all bitmaps)
this one actually changes the toolbar size while making use
of the new bitmap bundle functionality

Add more resolutions for all tool icon bitmaps

Wouldn't want Mark's eyes to bleed
2023-10-22 14:02:06 -04:00
Marek Roszko ba83e84b91 Move SaveCanvasImageToFile to EDA_DRAW_FRAME rather than leaking things to bitmaps 2023-10-16 18:33:11 -04:00
Jeff Young 974da4ea7c Push most of DIALOG_CHOOSE_SYMBOL down into PANEL_SYMBOL_CHOOSER.
Includes a dialog wrapper (DIALOG_SYMBOL_CHOOSER) and a frame
wrapper (SYMBOL_CHOOSER_FRAME).
2023-09-29 00:13:12 +01:00
Jeff Young 23033451b1 Cleanup. 2023-09-29 00:13:12 +01:00
Jeff Young 1047130046 Push most of footprint chooser into PANEL_FOOTPRINT_CHOOSER.
Create 2 wrappers for it: DIALOG_FOOTPRINT_CHOOSER and
FOOTPRINT_CHOOSER_FRAME.  The first now gets called from wxGrid
editors, text button editors (such as Change Footprints), etc.

Retire FOOTPRINT_VIEWER_FRAME_MODAL.  FOOTPRINT_VIEWER_FRAME still
exists, but has very few uses at this point.
2023-09-27 16:02:13 +01:00
Marek Roszko f8e33be07f Break out the boundary violating parts of gal into common through subclassing 2023-09-23 09:37:47 -04:00
Jeff Young 4fefd95e0c Move grid definitions to Prefs and grid origin to a separate dlg.
Grid origin is document-wide, while grid definitions are app-wide.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/2262
2023-08-26 13:32:24 +01:00
Mike Williams 132a0ada73 Grid Overrides: support grids-per-type that override the current grid.
Schematic only at this point while we test and refine.

PCB support is a future addition.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/14756
2023-07-25 10:17:57 -04:00
Jon Evans 3a0f8214fa ADDED: Properties panel for schematic editor
Initial infrastructure work; follow-ons will add more
properties for schematic items.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/6351
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14105
2023-06-22 22:32:24 -04:00
Jon Evans fc69939190 ADDED: GUI feedback when grid setting is changed by hotkey
Can be extended to other cyclical hotkey settings

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14756
2023-06-17 23:18:50 -04:00
Seth Hillbrand 14f6e32c74 ADDED: Change watcher for libraries
When editing or viewing library symbols, the files are watched for
underlying changes.  If any occur, the user is either prompted to reload
(if reloading would overwrite their current edits) or the file is
silently updated to the current version on disk.

This also sets a custom assertion handler to avoid unneeded crashes when
recieving invalid SAMBA packets and turns off assertions entirely when
running in release (non-debug) mode
2023-05-31 13:46:00 -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 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 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
Marek Roszko 343e3aee55 Remove unused m_sockets 2023-02-19 23:49:43 -05:00
Marek Roszko aacc9746e3 Yeet the last of wxSize/wxPoint to stop leaking gdicmn everywhere 2023-02-18 22:57:18 -05:00
Roberto Fernandez Bautista 1eef438a96 Always default to Accelerated (OpenGL) rendering and fallback if required
When falling back the GAL, let's not update the user preference and instead
just keep track of the failure that happened this session.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/11720
2023-01-04 12:58:19 +00:00
Jon Evans 5abf73e3c9 Never call ReCreateMenuBar inside a menu event handler
As of wxWidgets 3.2, the wxWidgets event handler runs code after the
the client event handler that depends on the menu still existing.
Because there are potentially many paths to call ReCreateMenuBar from
within a menu event handler, let's just wrap this action in a CallAfter
to make sure it happens after the wx handler call completes.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13149
2022-12-16 16:37:51 -05:00
Jeff Young 7f34586c7e Allow text variable resolution through properties in drawing sheet text.
Fixes https://gitlab.com/kicad/code/kicad/issues/12473
2022-09-20 15:28:05 +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
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
Mark Roszko f304e2d4f6 ADDED: Search/inspect pane 2022-09-14 02:59:57 +00:00
Marek Roszko e0f28fc4e1 Replace wxFindReplaceData with our own container
By dropping the flags, we can be strict with options.
Also it makes future usage of search functionality a little more "UI" framework independent
2022-08-23 22:16:51 -04:00
jean-pierre charras 09d8ac7d7c Zoom wxChoice in horizontal toolbar: display the actual or nearest zoom level. 2022-03-20 18:41:38 +01:00
Seth Hillbrand 4c8f556b80 Prevent UI updates from changing zoom selection
The zoom selection should only change when requested by the user, not in
response to UI updates.  This can cause unexpected zoom shifts when the
calculated zoom is within a range of one of the presets.  It also adds
unneeded calls during the UI update cycle

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

(cherry picked from commit 6810479a19)
2022-01-20 10:10:06 -08:00
Marek Roszko c4c56de708 Neurotically update position wxPoint usages 2022-01-01 11:55:51 -05:00
Marek Roszko 347e03363a Convert wxPoint/wxSize starting from EDA_RECT usages 2022-01-01 11:30:33 -05:00
Jeff Young 9ee28ea8f5 Flatten out some more preferences. 2021-12-24 15:43:20 +00:00
Jeff Young d28714167c All the preferences, all the time.
Fixes https://gitlab.com/kicad/code/kicad/issues/7877

Fixes https://gitlab.com/kicad/code/kicad/issues/5153
2021-12-24 13:08:44 +00:00
Jeff Young c9d858eaf5 Add status bar message for constraint mode.
Fixes https://gitlab.com/kicad/code/kicad/issues/9282
2021-10-24 14:04:12 +01:00
Jeff Young 11c91c7179 Improve obscuring dialog algorithm to handle multiple dialogs.
Fixes https://gitlab.com/kicad/code/kicad/issues/8970
2021-10-03 13:27:46 +01:00
Jeff Young 46949abe4a Don't scroll to highlight an object already visible. 2021-09-25 15:31:52 +01:00
Wayne Stambaugh 89b1fdabe9 Pass COLOR4D object by reference instead of on the stack. 2021-07-26 13:28:56 -04:00
david-beinder a5308e5f5c Fix python console toggle to work across pcbnew/eeschema 2021-07-03 22:48:46 +00:00
Jon Evans 32c21f4a94 Fix several window sizing problems on macOS
- Remove outdated y-offset that prevented restoring full-height
  (client area returned by wx is correct these days)
- Clamp frame geometry to fit new display when display is changed
- Handle when an automatic window reposition causes a DPI change

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8341
2021-06-17 23:59:19 -04:00
Marek Roszko b2f5c989a6 Suppress leaking eda_item so much via undo_redo_container.h 2021-06-08 19:12:30 -04:00
Seth Hillbrand c7d188a8d0 Centralizing SCRIPTING class 2021-06-01 20:18:24 +00:00
Seth Hillbrand 192fbfd5e5 Finalize Python Frame 2021-06-01 20:18:24 +00:00
Jeff Young c4cabb38d5 More worksheet -> drawing sheet cleanup.
Fixes https://gitlab.com/kicad/code/kicad/issues/8516
2021-05-31 12:26:44 +01:00
Ian McInerney 475ac3697f Ensure toolbar controls have the correct width on frame creation
Otherwise they could be slightly too small and then look odd.
2021-03-28 13:07:56 +01:00
Ian McInerney f6041fb52d Force update of some text when activation status changes
The text areas aren't always redrawn when the window is activated
or deactivated, so we need to force a refresh of the text to ensure
it is the correct font color.
2021-03-26 15:50:56 +00:00
Dominik Wernberger e2aa7be4b3 Added a lot of consts and refactored a few lines 2021-03-08 12:49:48 -08:00
Jeff Young a3b9e8ddb4 Round 2 of Worksheet -> Drawing Sheet. 2021-02-23 11:57:44 +00:00
Jeff Young cad5198ab7 Worksheet -> (industry standard) Drawing Sheet. 2021-02-22 17:35:46 +00:00
Seth Hillbrand d93ba0a06a Choose half-grid for mirror
Using the half-grid allows for odd-grid counts to remain on-grid,
closer to the actual center.

Fixes https://gitlab.com/kicad/code/kicad/issues/7493
2021-02-15 11:59:04 -08:00
Seth Hillbrand 505844f68c Generalize the Ctrl-Q to all frames
Rather than adding our handler to each frame separately, we initialize
the Ctrl-Q quit action at the base frame to be consistent
2021-02-09 11:43:42 -08:00
Marek Roszko 78dbcdcdb7 Slight fixup to previous library browse change 2021-01-28 07:31:32 -05:00