Jeff Young
41619ebbe2
Decouple PROGRESS_REPORTER interface from implementations.
2021-08-14 21:05:49 +01:00
Julian Fellinger
cc99323c86
Gerbview: use native tab widget
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8903
2021-08-08 19:44:58 +00:00
jean-pierre charras
76bdb423d7
Minor changes: minor code cleanup and fix minor Coverity warning
2021-08-04 16:47:41 +02:00
Jeff Young
95b87ba29a
Freshen microwave polygon dialog and remove a bunch of dead code.
2021-08-03 01:11:11 +01:00
jean-pierre charras
210671b10a
Gerbview, Excellon reader: add preference to configure default coordinates format. In Excellon drill files, the coordinate format is not specified, and sometimes units and zero option are even not specified, so some drill files cannot be read. In Preferences, default setting options are now added to specify by hand missing info.
2021-08-02 12:55:41 +02:00
Mike Williams
f2241d25c6
Gerbview: implement ;FILE_FORMAT parsing
...
Apparently Altium likes to output drill files with a specific header
setting the number format
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7519
2021-08-02 08:48:15 +00:00
Jeff Young
d40712d9d6
Formatting and message consistency.
2021-08-01 21:31:23 +01:00
jean-pierre charras
b1fd462d28
Gerbview, Excellon reader: use Leading Zeros format when not specified in file.
...
Some very poor files do not specify the coordinates format.
In this case, the default is INCH,LZ that looks like the more usual.
2021-08-01 11:44:45 +02:00
jean-pierre charras
70b5e26ff3
Gerbview, Excellon reader: fix incorrect size of tools when the size is embedded.
...
Some files embed the tool declaration size in Tool selection. In this case, the
tool size was not read.
2021-08-01 10:22:08 +02:00
jean-pierre charras
a2bb176b68
Gerbview: fix mismatch between shown layers and visibility indicator in layers manager,
...
after loading (or reloading) files.
Remove also not used code.
Fixes #8847
https://gitlab.com/kicad/code/kicad/issues/8847
2021-07-31 11:30:31 +02:00
Seth Hillbrand
6cd4d68d57
Add drop shadows to MacOS icons
...
Apple UI guidelines ask for small drop shadows on the icons. We add
these using ImageMagick when resizing
2021-07-30 20:55:34 -07:00
Seth Hillbrand
e7d8b1a975
Resize MacOS icons and script their creation
...
Creates a script that will fomat the MacOS icons at 80% of the total
size in line with Apple's guidelines.
Script requires Inkscape 1.0 and png2icns (available on Linux boxen)
Fixes https://gitlab.com/kicad/code/kicad/issues/7977
2021-07-30 20:28:14 -07:00
Seth Hillbrand
ad8acd328c
Expunge some remaining references to kicad-pcb
2021-07-30 20:27:45 -07:00
jean-pierre charras
1dbd4fcb7d
Gerbview: clear all previous highlight selections, after clearing all layers.
...
Fixes #8893
https://gitlab.com/kicad/code/kicad/issues/8893
2021-07-30 15:52:28 +02:00
Jeff Young
6aaf4413b3
Fix kicad_string.h / string.cpp mismatch.
...
They don't define a KiCad string class, so the header file name was
somewhat misleading. But the fact that they didn't match definitely
made coding more difficult.
2021-07-29 16:03:25 +01:00
Jeff Young
f221220fe2
Rename layer ids file.
...
It hasn't had anything to do with colors or visibility for some time
now.
2021-07-29 16:03:25 +01:00
Wayne Stambaugh
de92aaab9a
GerbView code cleaning.
2021-07-28 14:12:51 -04:00
Pradeepa Senanayake
c006a4f26e
Fixed style warnings
2021-07-28 17:55:45 +00:00
Pradeepa Senanayake
109e40c3a6
Ensure auto zoom is enabled when it's the first file
2021-07-28 17:55:45 +00:00
Pradeepa Senanayake
8f4ff1e954
Disabled zoom-to-fit when loading gerb files
2021-07-28 17:55:45 +00:00
Pradeepa Senanayake
9b7d056563
Moved auto zoom outside of the function which loads the gerbers and drill files
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8849
2021-07-28 17:55:45 +00:00
Wayne Stambaugh
37b200cb3e
Pass wxString objects by reference instead of on the stack.
2021-07-27 08:41:27 -04:00
Wayne Stambaugh
8fd83cbb95
Pass wxPoint objects by reference instead of on the stack.
2021-07-26 15:35:33 -04:00
Wayne Stambaugh
89b1fdabe9
Pass COLOR4D object by reference instead of on the stack.
2021-07-26 13:28:56 -04:00
Wayne Stambaugh
1a301d8eea
Stop using wxDialog::EndModal() from inside dialogs.
...
Calling wxDialog::EndModal() directly from inside the dialog is a
potential bug if the dialog is shown in the modeless or window modal
(quasi-modal). Use the internal button events where possible and
check for the appropriate mode before calling the correct end dialog
function.
2021-07-21 17:38:14 -04:00
jean-pierre charras
3c721c55de
Fix a misplaced break after code cleanup.
2021-07-17 08:53:23 +02:00
Wayne Stambaugh
cb72da294a
More NULL expunging.
2021-07-16 16:13:41 -04:00
Marek Roszko
c794a6ce7a
Add pdb install option for msvc
2021-07-14 23:42:45 -04:00
luz paz
0446d35f0d
Fix source comment/doc typos (follow-up)
...
Found via `codespell -q 3 -S *.po,./thirdparty -L aactual,acount,aline,alocation,alog,anormal,anumber,aother,apoints,aparent,aray,dout,einstance,modul,ot,overide,serie,te,,tesselate,tesselator,tht`
2021-07-13 10:48:17 +00:00
jean-pierre charras
1151783a34
Gerbview: fix an issue (Debug only) with RoundRect aperture macro.
...
When a RoundRect aperture macro was used with a radius = 0, a wxWidget assert
was generated, due to incorrect polygonal shape to draw.
2021-07-13 10:23:55 +02:00
Jeff Young
a1dfc36233
More error message regularization.
2021-06-29 01:08:26 +01:00
Jeff Young
5c21f93803
Consistency in progress and error messages.
2021-06-26 13:23:43 +01:00
Jeff Young
685ee31c35
Workaround a few more OSX printf problems.
...
Also regularizes the frame title processing.
Also fixes a type where the library name wasn't processed for
variable expansion.
Fixes https://gitlab.com/kicad/code/kicad/issues/7742
2021-06-20 22:48:19 +01:00
jean-pierre charras
2f9ce63623
Fix incorrect (not updated) canvas_type saved in config
2021-06-19 10:11:49 +02:00
Jeff Young
1722bc03b0
Consistent terminology and punctuation.
2021-06-17 00:05:17 +01:00
Jeff Young
24bf5d3c5c
Use create-if-missing behaviour for layers map.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/8618
2021-06-16 17:31:31 +01:00
jean-pierre charras
a297e8f202
Gerbview, export to pcbnew: use gr_circle instead of polygon for flashed round shapes
2021-06-12 09:26:36 +02:00
Jeff Young
096e342386
Prefix TRACK, ARC and VIA.
2021-06-11 22:07:02 +01:00
luz paz
5f1e9bc8a7
Fix typos in source code
2021-06-10 01:24:15 +00:00
luz paz
f968fc8719
Fix source comment / documentation typos
2021-06-09 19:32:58 +00:00
Marek Roszko
d946d6e68f
Cleanup some pgm_base.h includes
2021-06-08 21:56:00 -04:00
Marek Roszko
c854811ac4
Parent frame already includes undo_redo_container.h
2021-06-08 19:12:30 -04:00
Jeff Young
2aaec31832
Don't put up "old version" warning for gerbview-generated PCBs.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/8574
2021-06-08 22:12:44 +01:00
Marek Roszko
f9769dba13
Kick wx.h out of gerbview
2021-06-07 18:38:51 -04:00
Jeff Young
3ff670d2a4
Disable ACTIONS::openPreferences for now.
...
wxWidgets needs to move the item to the KiCad menu on Mac, and it
can only find it if it has the id wxID_PREFERENCES.
2021-06-07 20:51:45 +01:00
Marek Roszko
63220e5adc
Rename myframe to m_frame in gerbview_layer_widget
2021-06-06 19:05:12 -04:00
Marek Roszko
ea2fe4e76c
pgm_base doesnt need to be shared to all of gerbview
2021-06-06 19:05:12 -04:00
Marek Roszko
33bbf85a3e
Use the parent frame GetSettings helper rather than including for Pgm()
2021-06-06 19:05:12 -04:00
Ian McInerney
dc27079b71
cleanup tool event and tool action includes
2021-06-06 18:26:26 +01:00
Jon Evans
c9a660a80c
Rework JSON integration to speed up build
2021-06-05 17:08:38 -04:00
Marek Roszko
b1c9083743
Remove the wx/docview.h include
2021-06-03 18:42:08 -04:00
Wayne Stambaugh
5395a7fe67
GerbView header housekeeping.
2021-06-03 14:32:24 -04:00
Wayne Stambaugh
7c14e4e967
Common widget header housekeeping.
2021-06-03 12:02:45 -04:00
jean-pierre charras
d7616fdca8
Fix a few compil or coverity warnings.
2021-06-01 09:04:37 +02:00
Marek Roszko
382dca4e6f
Fix uninitialized member warnings
...
Based on PVS Studio report
2021-05-30 20:01:01 -04:00
jean-pierre charras
81c7fb61f8
Sub-menu "Preferences..." in main menu "Preferences": fix not working accelerator key.
...
Accelerator keys are disable in our WX_MENUBAR. A common ACTION_MENU is used and
"Preferences..." is now shown in Hotkeys list.
2021-05-29 18:09:49 +02:00
Seth Hillbrand
752ae4d519
Rename modification flag routines
...
Differentiates better between the EDA_ITEM IsModified(), referring to
items themselves changing and the EDA_SCREEN IsContentModified(),
referring to whether we have made any unsaved changes.
2021-05-28 12:07:04 -07:00
Seth Hillbrand
b1dcf74042
Use standard "Untitled" name for files without names
...
Also translates to provide useful information regardless of language
2021-05-28 11:51:54 -07:00
Jeff Young
7356f9568d
Move grid disable modifier from ALT to CTRL.
...
Also had to move the H/V/45 disable modifier from CTRL to SHIFT.
Fixes https://gitlab.com/kicad/code/kicad/issues/8124
2021-05-09 20:17:40 +01:00
Marek Roszko
e955f83c51
Use a unique_ptr for ensuring clean up when reading excellon files
2021-05-01 14:23:01 -04:00
jean-pierre charras
0427bda768
Remove useless wx/wx.h include, that create sometimes compil warnings on msys.
...
wx/wx.h includes all wxWidgets .h files, and sometimes creates collision
names in #define between kicad and windows headers
Moreover, blindly including a lot of useless files is compil time consuming
2021-05-01 19:32:15 +02:00
Marek Roszko
850a22c3ae
Try/catch gerber file loading in attempt to catch oom
...
Potentially help with #7444
2021-05-01 12:46:18 -04:00
Ian McInerney
ecd9bf696e
Be consistent about using nullptr instead of 0
...
0 can be too easily overloaded into an int, so ensure we use nullptr
when we mean pointers.
2021-04-22 22:20:34 +01:00
Marek Roszko
ce3a84f579
Consolidate wx aui dock art color setting
2021-04-19 21:12:02 -04:00
Jon Evans
433e148e08
Move some string formatting functions out of base_units
...
Keeping them in base_units means that we can't introduce
any dependence on these functions to anything that needs to
compile without one of the unit defines (EESCHEMA, PCBNEW, etc)
2021-04-14 23:21:10 -04:00
Marcus A. Romer
1632707d9b
Replace tabs with spaces
2021-04-05 01:13:39 +00:00
Ian McInerney
1931677316
Ensure the layer dropdowns are correctly sized
...
On GTK, the layer dropdown was sized based on an empty list,
so for non-default fonts it would be undersized and cutoff
the font.
2021-04-02 21:33:31 +01:00
Ian McInerney
1db5e2bc96
Don't force an entire refresh of toolbars to update sizes
...
Forcing an entire refresh of the toolbars is wasteful,
so instead just update the sizers directly.
2021-04-02 19:12:21 +01:00
Ian McInerney
0a0935e0f3
Remove ACTIONS::TranslateLegacyId and TOOL_DISPATCHER::DispatchWxCommand
...
After commit 9535153f9e
there were no more IDs inside the legacy ID
system. Therefore the entire system for dispatching and looking up
the legacy ideas and handling those events can now be removed and
the tool dispatcher simplified (it no longer needs to know about
the ACTIONS class).
2021-03-30 23:20:22 +00: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
42c6af4bd8
Cleanup ACTION_MENU creation in some places
...
The ACTION_MENU constructor now takes the tool as an argument,
so the call to SetTool() immediately following it can be removed
and the tool just passed into the constructor.
2021-03-27 19:16:58 +00:00
Ian McInerney
3146d03aaa
Properly ellipsize layer names in the GerbView layer manager
...
Before, the layers were always ellipsized if the name was >30
characters, even if the widget was wide enough to display
the full name. Now they are ellipsized when needed (e.g. if
the widget is shrunk small enough).
Fixes https://gitlab.com/kicad/code/kicad/issues/1919
2021-03-26 15:50:56 +00:00
Jon Evans
c04e19f9ac
Include optimization: move some things from common.h to point-of-use
2021-03-20 12:09:18 -04:00
jean-pierre charras
c1197903e4
Gerbview: fix regression: missing DCode highlight commands.
...
DCode selected by context menu or from toolbar is now highlighted.
2021-03-13 18:45:33 +01:00
Jon Evans
18037e2f65
Rework bitmap system to load from archived PNGs
...
Bitmaps are now identified by an enum class instead of by pointers.
Bitmap loading and caching is now handled by a class in common, and
we no longer compile most bitmaps into the binary, so there is no
longer a bitmaps static library.
Instead, bitmaps are archived to a .tar.gz file which is installed
in ${KICAD_DATA}/resources/images.tar.gz
The source PNGs are checked in to Git as the original CPP files were,
so that people can build without the required dependencies to convert
SVGs to PNGs.
Initial support is also added for dark theme icons, although this
is not yet exposed in the GUI.
Stubs are present for multi-resolution image resources, but this is
not fully-baked yet and could use some refinement.
2021-03-11 08:37:35 -05:00
Marek Roszko
3d4ac9af03
Relocate win32 resource files to the central folder for further consolidation
2021-03-09 21:48:14 -05:00
Marek Roszko
20c43f48b4
Update a old GerbView window title
...
Fix #7854
2021-03-09 18:31:17 -05:00
Jon Evans
720147d272
Remove transitive inclusion of bitmaps.h
2021-03-07 16:08:57 -05:00
Marek Roszko
8831c5567c
Add win32 version manifest block
2021-03-04 00:34:48 -05: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
Jeff Young
34d3218f73
Translation cleanup.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/6078
2021-02-21 23:13:13 +00:00
Jeff Young
2d28ed8eda
Move canvas backend selection to Preferences.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/7630
2021-02-21 20:12:43 +00:00
Jeff Young
66b33834b5
Always enable save; move dirty bit to asterisk in title bar.
...
Also unifies PCB Editor and Schematic Editor names with other
locations in the GUI (which were still Pcbnew and Eeschema).
Fixes https://gitlab.com/kicad/code/kicad/issues/7587
Fixes https://gitlab.com/kicad/code/kicad/issues/7594
2021-02-18 16:05:42 +00:00
Seth Hillbrand
8c2fe42ef0
More Undo/Redo Cleanup.
...
Don't need the reference point or container action type. Clearing this
command signatures to prevent future confusion/use
2021-02-12 11:26:48 -08:00
Marek Roszko
872184fe8b
Revert "Bump minimum required CMake version to 3.10"
...
This reverts commit a475f45753
.
2021-02-09 18:46:13 -05:00
Simon Richter
a475f45753
Bump minimum required CMake version to 3.10
...
This allows us to remove even more workarounds
2021-02-08 12:23:08 +00:00
Marek Roszko
39fb968820
Fix broken map in findNumX2GerbersLoaded
2021-01-31 11:51:08 -05:00
Jeff Young
a235103e48
Redo pad & via painting (again).
...
New strategy isolates all draw/don't draw decisions to the ViewGetLOD
routines, and all dimmed/not dimmed to PCB_RENDER_SETTINGS::GetColor.
The actual drawing in PCB_PAINTER is more-or-less conditon free.
Also adds new layers for pad and via hole walls so that they can be
controlled for high-contrast mode.
Also changes the drawing paradigm so that the pads are drawn even when
not on the high contrast layer, just in low contrast. The hole wall
is drawn in high contrast. This actually makes things clearer to the
user (although to be honest was done to keep from having to re-render
pads when the high contrast layer changes since we have two separate
layers now that we can adjut colours on).
Fixes https://gitlab.com/kicad/code/kicad/issues/7328
2021-01-30 16:31:27 +00:00
jean-pierre charras
8aac6cb607
Gerbview: fix incorrect reload command.
...
Fixes #7316
https://gitlab.com/kicad/code/kicad/issues/7316
2021-01-29 11:10:26 +01:00
Jon Evans
ff4c01c4a4
Don't say a gerber is an X2 unless the whole attribute is loaded
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7303
2021-01-27 17:17:44 -05:00
Wayne Stambaugh
4619d5e112
Fix more broken Doxygen comment specifiers.
2021-01-26 12:17:52 -05:00
Michael Kavanagh
b90eabd68b
Icons: out with the old, in with the new
...
+ remove icons where they dont make sense or are duplicated within the
same context
2021-01-19 22:57:24 +00:00
Michael Kavanagh
dc83cb7a41
Icons: general tweaks and pixel alignment
...
+ remove some unused icons
2021-01-11 23:31:25 +00:00
Michael Kavanagh
bc52d7413c
Icons: we have new ones, so lets use them
2021-01-11 23:31:24 +00:00
Michael Kavanagh
adc10ac6c5
Icons: remove superfluous grey
2021-01-06 00:35:20 +00:00
Michael Kavanagh
b40e3a39f5
Minor cleanup.
2021-01-04 23:59:36 +00:00
Michael Kavanagh
a7286ccc34
Icons: remove functional duplicate
2021-01-04 01:44:01 +00:00
Seth Hillbrand
21e0aa7cb5
Remove file_footprint icon
2021-01-01 11:43:28 -08:00
Jeff Young
fd77982496
Formatting.
2020-12-25 23:37:17 +00:00