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.
Also fixes a bug where we didn't triangulate at all when the char
count didn't warrant the likely overhead of spinning up a
thread_pool.
And fix another bug where EDA_TEXT::GetRenderCache() wasn't using
the given font.
Also reverts using the cache for drawing-sheet text. The text
items are created from scratch from the data items each time
they're drawn, so there's never an existing cache to make use of.
Instead, we now check that the item is in the view, using a very
approximate bounding box generator (because even generating a
real bounding box shows up large in profiles).
And, lastly, fixes a bug where EndPos was never considered in
DS_DATA_ITEM::IsInsidePage().
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14822
Temporary and autosave files do not neccessarily have the correct
permissions set to replace existing project files. This updates the
permissions to match the existing values where possible
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13574
This reverts commit 33da9b2327 and the
following commit dc08c48f33.
C++17 changed the behavior of static class member variables that are
constexpr defined. Previously this definition/declaration split was
valid for constexpr members, but after C++17 the static constexpr member
variables are automatically inlined, so the declaration is no longer
exported in some compilers (GCC 9/10/11 seem to have problems).
An alternate way of constexpr member variables is putting the
initialization in the class definition, but we can't init a COLOR4D
object when defining the COLOR4D class.
For now, revert this change until we can figure out the proper way of
architecting these colors.
This library is meant to move non-EDA items (language extensions,
library extensions, etc.) into the lowest-level of our dependency chain.
This library should never depend on anyother non-thirdparty code in the
kicad codebase.
* Add compare method to COLOR4D object.
* Add unit test to validate COLOR4D comparison method.
* Add missing color test in text attribute comparison method.
* Add unit test for text attribute object.
* Remove unnecessary headers from text attribute header.
* Move text attribute code into separate source file.
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
The link maps were actually disabled by default before
912f1d5cec, and required KICAD_MAKE_LINK_MAPS
to be provided to enable them. So switch back to disabling them by
default.
Also, The lld linker is unable to accept a single dash cref option, while
ld and gold can. Instead, use the double dash version that is supported
by all three.
xref: https://github.com/llvm/llvm-project/issues/60932
Co-authored-by: aris-kimi <aris_kimi@hotmail.com>
Co-authored-by: Ian McInerney <ian.s.mcinerney@ieee.org>
Remove some useless spacers, and do not force some widgets to have a to
large size (by removing empty areas).
Work in progress: one panel is still too big.
For the sake of consistency across all dialogs and window that behave
like dialogs, remove the static line that separates the main part of
the dialog from the standard buttons. This only applies to windows
that have the standard button on the bottom of the frame.
This covers the 3D viewer, CvPcb, common, GerbView and KiCad dialogs.
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
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.
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
Since EDA_TEXT is a base class, we can just force the child classes to pass the correct iu scaled size
ALLOW_BOLD_THICKNESS removed because it's a pre-custom font holdover
Tested on msys2 which is the only place it would have been buggy
CMake seems to share the gdiplus linkage with the other dependencies automatically now
Thread pools are long-lasting executors that have close to zero overhead
when launching new jobs. This is advantageous over creating new threads
as we can use this for threading smalling jobs and smaller quanta. It
also avoids the heuristics needed to determine the optimal number of
threads to spawn
Also implements a uniform mechanism for avoiding auto-scroll after
a prime event or dialog which results in a mouse position at the
edge of the canvas.
Fixes https://gitlab.com/kicad/code/kicad/issues/11057
Our menu bar code is interestingly complex. But we were throwing away newly made menu items to the void in the cases of constructed on the fly submenus
CHANGED: The text variable ${SHEETNAME} now always represents the name of the
sheet when used anywhere in the schematic editor, including the title block
ADDED: A new text variable ${SHEETPATH} which is replaced with the path to the
current sheet - e.g. "/Sheet 1/Sheet 2".
To ensure backward compatibility, the default drawing sheet now uses
${SHEETPATH}. Custom drawing sheets will need to be manually edited.
Previously, coordinates were clamped to +- 60 inches. It makes no sense to
clamp them at plotter level: max cooed depends on the editor (schematic/board...)
Rename MAX_PAGE_SIZE_MILS to MAX_PAGE_SIZE_EESCHEMA_MILS and use it only for Eeschema.
Fixes#11196https://gitlab.com/kicad/code/kicad/issues/11196
Avoid excess writes to the project directory to dodge issues with remote
file systems not fully writing data.
wxRename works across disk boundaries (in theory) and falls back to
wxCopy/wxRemove when it fails
Fixes https://gitlab.com/kicad/code/kicad/issues/10747
ADDED: with cmake KICAD_MACOSX_APP_BUNDLE option the user can disable
the macOS app bundle creation when compiling on macOS. This permit to
use/install KiCad like any other *nix platform (/usr/bin, /usr/share,
ecc.). By default, cmake build the app bundle.