When setting search history using the CTOR, we need to avoid triggering
an event that will run independent of the user interaction. Our
LIB_TREE interface is fragile on GTK and needs explicit conditions to
avoid segfaults
Fixes https://gitlab.com/kicad/code/kicad/issues/11633
When moving windows between monitors on Mac that changes the DPI, we
observe incorrect re-sizing of columns and rows. This attempts to
rectify the situation by avoiding DPI changes for Mac builds.
Fixes https://gitlab.com/kicad/code/kicad/issues/10586
Also makes sure the progress dialog is closed when we're done reading
symbols (it used to stay up for much of the symbol editor initialization).
Also makes sure that any cancel in the preLoad step is honoured in the
sync step. (The preload is done because it is multi-threaded and therefore
faster than the single-threaded sync.)
Also makes sure that individual threads pay attention to the cancellation,
not just the GUI thread.
Fixes https://gitlab.com/kicad/code/kicad/issues/8372
The baseline -1 buffer works for some GTK themes but not others. -3
appears to work for chunky themes like those used in KDE (and others).
Fixes https://gitlab.com/kicad/code/kicad/issues/5690
Includes bug fix for catastrophic error in Add() for converting to
radians.
Includes bug fixes for the fact that the pcbnew test can't seem to
find the ANGLE_* objects (getting all 0's instead).
Especially using a translated name breaks kicad config and files because
in non English languages both translated and not translated names were used in code.
1) Unify metrics between stroke and outline fonts
2) Unify handling of rotation and mirroring
3) Bug fixes in collision handling
4) Use of VECTOR2I (instead of VECTOR2D) for world-coordinates
5) Generate outline font overbar with rounded ends and fix rotation
bugs
6) Generate wxEVT_CHOICE events from FONT_CHOICE::SetFontSelection
7) Change text-item PNS SOLIDs to use compound shapes
Either the recently added size-event works better than the version I
originally tried or it's simply no longer needed in wxWidgets 3.1.
In any case, I can't reproduce the wxGrid layout errors anymore.
This only affected the tree controls that only parented sub-pages. Do
not use the dialog ctor to select the initial page. Queuing a page
changed event to fire after the dialog is shown is the proper solution.
ADDED: Option to assign unique reference designators to footprints
created with the array tool [pcbnew]
CHANGED: Array creator dialog no longer displays pad numbering properties
when in the board editor. [pcbnew]
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2354
Unused variables in function calls can be commented out. Unused
return variables get a new routine `ignore_unused()` that silences the
warnings with zero overhead.
Also cleans up the dialog a bit.
Also changes the workings of NormalizePath to return the input if
it couldn't be shortened which saves open coding that behaviour in
all its callers.
Fixes https://gitlab.com/kicad/code/kicad/issues/9036
Mac already uses diverse font sizes (for instance, smaller fonts for
radio button groups), and the anti-aliasing is a lot better. The
other platforms need a more limited range of sizes.
Fixes https://gitlab.com/kicad/code/kicad/issues/8608
It appears that both strategies in the last commit worked, leaving us
with squared scaling. The dialog pixel architecture seems safer than
our icon scaling stuff, so this version attempts to use only it.
Also works around a bug where wxELLIPSIZE_MIDDLE doesn't work on Mac.
Fixes https://gitlab.com/kicad/code/kicad/issues/8608
Fixes https://gitlab.com/kicad/code/kicad/issues/8375
This requires enabling the space key to be bound with shift, which was
disabled based on an overbroad limit of only allowing shift to be mapped
with letter keys
Seems to cause issues on Windows where the animation locks the screen.
Doesn't effect Linux, possibly because wxWidgets uses a native GTK
infobar that doesn't animate anyway.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8987
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.
This adds an icon to the left of the row with an error symbol if the
file can't be found or opened, and shows a tooltip over the icon with
and error string.
Fixes https://gitlab.com/kicad/code/kicad/issues/3815
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.
wxWidgets drives some of this problem, it blindly calls SetValue and invokes the win32 update position messages on all the scroll subevents and we end up fighting it as well by inserting the rounded position on each subevent rather than the final one
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
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
This allows for color changes and scaling of the arrow
when the display needs it (e.g. HiDPI displays).
Also make the arrow and text respond to if the window is
active to mimic native controls.
Fixes https://gitlab.com/kicad/code/kicad/issues/6042
When the window is not active, the status bar uses disabled text,
so the message panel sticks out because it is then using a different
text color. This is most noticable in dark mode.
If we keep doing design validations at two different places, they can
only start to drift apart. Board Setup should validate for malformed
data ONLY; everything else is the business of DRC.
This also fixes a bug where implementation validations would not allow
OK in the dialog, but wouldn't put up a message to say why. We now use
the InfoBar impl from Jon's commit for that.
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.
When updating the libtree, we modify the tree multiple times to avoid
crashes on Linux. These generated events that buffered while the widget
was frozen and resulted in redrawing the same footprint 4-10x.
This reduces the buffering by discarding events that are generated
during the freeze and only redrawing when there is a new footprint to
draw
For some kinds of issues, we want a way to point them out but
we don't need to keep the user from being able to close the
dialog. A separate Validate button lets the user check for
issues if desired, but these issues are not "fatal" and can
be ignored if the user wishes.
Due to a truncation when converting a value to integer, the first point was
sometimes missing because it looked like out of plot range.
Fix also a cosmetic issue in dialog.
Fixes#7345https://gitlab.com/kicad/code/kicad/issues/7345
So many things can go wrong with this control in GTK. We have to
collapse the tree when updating the search string to avoid a crash when
referencing a child object but collapsing the tree will iterate over
elements and crash when we have deleted a symbol.
The temporary fix for this nonsense is to carefully order the calls.
We only need to collapse the search tree if we are not keeping our state
(in other words if we are fully re-building the tree)
Fixes https://gitlab.com/kicad/code/kicad/issues/6910
- Fix a minor coding style issue.
- Remove double buffering, not needed with the new code, and that creates a
minor cosmetic issue when showing or hiding the infobar.
Also don't load the footprints up front. The whole purpose of the
footprint-info stuff is to have enough info about the footprints to
filter them *without* loading. After that just load individual
footprints as we need them.
Fixes https://gitlab.com/kicad/code/kicad/issues/6177
Focus was on the dialog instead of the panel. The dialog doesn't
have the IsUserPanel flag set and so wxEVT_CHAR processing doesn't
happen. (Why? I haven't a clue.)
Also fixed some more performance issues with the auto-column-widths.
Fixes https://gitlab.com/kicad/code/kicad/issues/6591
So the new steals-focus protection stuff works well when there's a
focused control, but not as well when there's a modal dialog up which
happens not to have a focused control (or worse, a focusable control).
This adds a second mechanism for also checking to see if a modal dialog
is up (something that wxWidgets, true to form, makes very difficult).
Fixes https://gitlab.com/kicad/code/kicad/issues/6520
Use wxCOL_WIDTH_AUTOSIZE instead of fixed column sizes. This doesn't fix
the initial sizer layout issue on wxWidgets 3.0 but at least resizing the
dialog has better column width behavior.
As if the original hack wasn't embarassing enough, the only change
here is to make the number bigger.
WICKED HILLARY wanted to use wxBoxSizers that are FAR TOO SMALL.
So sad.
But we're going to look at that. I think we're going to have
BIG wxBoxSizers. Probably the BIGGEST wxBoxSizers of anyone.
(The bug is that the Sheet Border swatch in PANEL_EESCHEMA_SETTINGS
doesn't otherwise get drawn unless that panel is the one showing
when preferences is opened.)
in most of files, including wx.h is not necessary, when only 2 or 3 wx files must be included.
Moreover, on windows, including wx.h sometimes create compil warnings about
shadowed vars defined in some specific windows headers.
You can now enable and disable snap to grid when drawing/editing across
all apps. You can also tie snap to grid to the visibility of the grid
to allow rapid enable/disable via grid display.
Also moves to WX_GRID to get rid of some wxGrid bugs, and moves the
provision of attrs to the GRID_TABLE (as those applied to the grid
are ignored when a table is specified).
Fixes https://gitlab.com/kicad/code/kicad/issues/5260
This commit modifies the UNIT_BINDER class to invoke the ORIGIN_TRANSFORMS
methods to support Display Origin Transforms.
The EDA_DRAW_FRAME class is modified to instantiate an ORIGIN_TRANSFORMS
object providing null transforms. A function is provided to allow the
UNIT_BINDER to find the ORIGIN_TRANSFORMS object in an overrideable manner.
Display warning infobar in the board/schematic setup when no project
is loaded, since most of the settings in those dialogs are saved in
the project and not in the board/schematic file.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4868
Short net names are not unique; full names with paths must be used.
Added a grid cell renderer that does the escaping, to make it easier
to display net names in grid cells.
Once you unescape a net name, you can't go back to the escaped form
because you can't assume which `/` should be {slash} and which `/`
Because of this, we cannot use Unescape/Escape on the data model in
the netclass setup panel, and instead do the Unescape in the view.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5331
* Make the app progress indicator only have the indeterminate state
when the taskbar indicator is used (causes an uused variable warning
on wx<3.1)
* Remove unused dry run variable in pcb_netlist.h
* Remove unused forceDropAnnotations from the paste special dialog
since the dialog only controls keeping them.
The use of printf, wxLogDebug, and std::err/std::out causes excessive
debugging output which makes finding specific debugging messages more
difficult than it needs to be.
There is still some debugging output in test code that really needs to
be moved into a unit test.
Add debugging output section to the coding policy regarding debugging
output.
Just setting the text field is not guaranteed to fire
a text event, so we must forcefully call the regenerate
function to ensure the preselect is handled.
Fixes https://gitlab.com/kicad/code/kicad/issues/4105
This ensures the colors used by the status text pane in the preview
widget are the same as the canvas, so there is a seemless transition
between the two.
Additionally, remove the scrollbars from the symbol preview widget
in the place symbol dialog - they are pointless.
ADDED: Progress indicator in the taskbar
This adds a progress indicator to the Windows and macOS taskbar
icons to display the progress of some operations.
Note, this requires wxWidgets 3.1+
This way, when the user changes their color theme, any sheets
that did not have a specific color set will change with the theme.
Also add a button to clear color overrides from a sheet, because
any schematics that have been saved before this change will have
the colors set to something other than UNSPECIFIED.
The old way of checking for focus loss caused GTK to be unable to
even open the combobox. This way checks for the event sent when the
list closes and uses that to close the grid editor.
Fixes https://gitlab.com/kicad/code/kicad/issues/4617