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.
First issue: the C++ action plugins list should be cleared so that any
plugins that fail to reload do not hang around on the toolbar.
This is fixed on the C++ side.
Second issue: inner dependencies of plugins that are modules were not
reloaded before, which broke reloading for many plugin examples out there.
This is fixed on the Python side by keeping track of dependencies and
clearing them out before reloading a module (unfortunately there doesn't
seem to be a way to do this in the standard library)
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7245
You had to set the line width in the SVG export dialog in order to
change the displayed line width in the 3d viewer. The line width did
not affect the SVG export. Removing in favor of the Board design
settings for line widths
The conditions prevent use in immediate mode for common actions. While
this makes enable/disable easier in menu items, this fix is a patch
until we refactor the action framework to distinguish between immediate
mode hotkeys that should start without selections and menu items that
need a selection before running.
Fixes https://gitlab.com/kicad/code/kicad/issues/5333
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
In theory, the WM should now choose the closest size icon for its
purpose, making it easier to distinguish in space-constrained settings
Fixes https://gitlab.com/kicad/code/kicad/issues/6798
When pcbnew is built with python support, the env vars defined inside Kicad
(and used mainly in paths) are rewritten for the python environment.
Unfortunately, the values are rewritten as UTF8 string, but in Kicad they are
just expected in utf32 unicode values.
This is now fixed by rewriting the initial values in Kicad env, after the
python environment is initialized.
The performance of live resizing isn't great. Windows can send mouse moves at 1000 Hz which is faster than the complex appearance panel + canvas can paint properly.
The groundwork has now been laid for per sheet instance data. Initially
this only supports sheet page numbers but could be expanded to include
other per sheet instance information.
ADDED: Support for user defined schematic page numbers.
Correctly hide netnames in high contrast mode
Correct highlighting for blind/buried/micro via drills
Repaint vias when needed to support stacked microvias
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2593
Two main changes: netclass values need to go through the DRC engine
so they can interact with other rules. They're also now dependent
on the layer being routed as well as the start object.
Also make the controls adjust to each other better. For instance,
copy-track-width needs to turn off when you select a particular
track width, and a particular track width needs to zero out when
you choose copy-track-width.
Fixes https://gitlab.com/kicad/code/kicad/issues/5951
This will always show 1 unit from each system, with the primary unit
being the current frame unit and the secondary unit being the
most recent unit used from the other system. These are saved in
the settings, so they are saved between runs.
ADDED memberOf() function for DRC rule expressions.
Also fixes a bug in several of the pickers where the event wasn't
being correctly passed.
Fixes https://gitlab.com/kicad/code/kicad/issues/5647
These objects can now be used in advanced DRC rules and
not just for keeping things out. Also remove the restriction
that at least one of the "basic" keepout rules must be set,
so that these areas can be used for more advanced rules.
OnBoardChanged must run after LoadProjectSettings.
Move the local overrides to PCB_EDIT_FRAME::onBoardLoaded
so that they are run after the panel is initialized.
This may affect other EDA_DRAW_FRAME objects as well but it doesn't seem
to be as noticeable in the symbol, footprint, and worksheet editors.
Fixes https://gitlab.com/kicad/code/kicad/issues/5248
The variables in the common settings struct are only updated on
save, so Python must use the ones from Pgm to get its values.
This does lead to the observation that Python's changes to the
variables do affect KiCad (they can break resolvers). So apparently
it can mess with us but we can't mess with it easily.
Also, improve the environment variable tracing infrastructure to capture
more changes.
Before this, the environment variables inside Python wouldn't reflect
the updates to them made after the interpreter was started in Pcbnew.
This will call into Python and set the variables when they are changed,
since Python can't synchronize itself when running in an embedded
interpreter.
Fixes https://gitlab.com/kicad/code/kicad/issues/5071
This isn't truely correct, because it is pointing to the
main KiCad path, but it is more correct than pointing to
the system path. This should really be pointing to the
user path
(see https://gitlab.com/kicad/code/kicad/-/issues/5115)
This is particularly important to keep the user from having to
enter overly verbose statements such as:
A.Type == 'via' && A.Via_Type == 'buried'
when:
A.Via_Type == 'buried'
is perfectly clear.
- convert expression string tokens to single-quote-delimited
- fix bug where netclass assignments weren't getting updated after
board setup dialog
- move property manager rebuild to lazy evaluation
- improve performance with wider use of const&
- retire DRC_SELECTOR stuff
- use wxString for GUI stuff (particularly translated stuff)
- fix EqualTo() to return false instead of asserting when op types
don't match
- fix buffer overruns with fixed-size string buffers
- make expression function calls case-insensitive
- integrate expression errors into rule parser
- produce more and better error messages
- keep BOARD_ITEM ptrs const as long as possible
- fix a couple of uninitialized variables
List of hidden nets stored in project local settings
Hide/Show actions in context menu only for now, will
add them to some more GUI places soon.
Ref https://gitlab.com/kicad/code/kicad/-/issues/1951
Per discussion on the developers list, this old system
no longer provides much value and is seen as annoying
by many users. The new save logic should prevent any
cases of file corruption on save, which was a major
reason for the backup file system existing.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2012
Various architecture upgrades to support this.
Creating a BOARD now requires a valid PROJECT, which caused
some (mostly transparent) changes to the Python API internals.
ADDED: Project local settings file
CHANGED: Board design settings are no longer stored in PCB file
CHANGED: Net classes are no longer stored in PCB file
CHANGED: Importing board settings now reads boards, not just projects
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2578
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4070
BuildConnectivity updates the ratsnest after it completes. By compiling
the ratsnest before connectivity, we update it twice with the dirty flag
being reset after connectivity updates.
* Consolidate the measure tool into one tool (this gives cvpcb
unit changing and snapping capabilities in its measure tool)
* Transition cvpcb to use actions for the sketch modes
* Replumb how magnetic items settings are stored and used
* Move it to a panel along with the canvas to have a better UI
* Allow the infobar to automatically close after a set time
CHANGED: The eeschema find notifications now use the infobar instead of
a popup window
This widget allows for non-intrusive display of text
above the editing canvas. Currently, this is used
for displaying the read only status of the files.
Migrate COLOR_SETTINGS 0->1 to remove fpedit section
Migrate FOOTPRINT_EDITOR_SETTINGS 0->1 to use new theme if created
Remove COLOR_CONTEXT that is no longer needed
* Push all sizing operations into EDA_BASE_FRAME
* Save the unmaximized window size when maximizing
so that we can then save it in the config if the
window is maximized. Otherwise the config ends up
with the maximized size saved, and weird behavior
occurs when unmaximizing on the next opening.
Now only reposition a window if it is completely on a
disconnected display or if only one corner is on screen
and it is within a region close to the screen border.
CHANGED: Window position on startup should be preserved more
Please note that the symbol cache is not embedded in the schematic file
to allow for round robin testing with the existing file format. Once
the parser round robin testing is complete, the symbol cache will be
embedded in the schematic file.
By making it quasimodal, it allows the main KiCad window and Eeschema
to be used still, if it were just modal then it blocks out all other
windows.
Fixes https://gitlab.com/kicad/code/kicad/issues/4023
Keeping a pointer to the actual file history inside a special
file history menu led to many cases of use after free crashes,
so instead rework the actual file history to add the menu
items.
Fixes https://gitlab.com/kicad/code/kicad/issues/3741
CHANGED: Settings are now stored in versioned sub-directories
ADDED: First-run dialog for migrating settings from a previous version
CHANGED: Settings are now stored as JSON files instead of wxConfig-style INI files
CHANGED: Color settings are now all stored in a separate settings file
CHANGED: The symbol editor and footprint editor now have their own settings files
CHANGED: Color settings are no longer exposed through BOARD object
CHANGED: Page layout editor now uses Eeschema's color scheme
Settings are now managed through a central SETTINGS_MANAGER held by PGM_BASE.
Existing settings will be migrated from the wxConfig format on first run of each application.
Per-application settings are now stored in one class for each application.
Now that the tool framework gracefully shutdowns the tools, graphics
can be created on the stack inside a tool function.
This reverts commit f6881ce3de.
Create an IsContentModified() function in each frame
that provides if the content has been modified, and
use that instead of always copying the checks.
* Make the grid display settings separate from the board object
* Ensure that the grid is initialized on creation in all the frames
Fixes: lp:1843169
* https://bugs.launchpad.net/kicad/+bug/1843169
- Previously a warning was generated even for not connectable pads
(pads not on copper layers or without pad name).
- The test is now optional and is disabled by default.
(pads without corresponding pin is schematics are a frequent case)
Fixes: lp:1852444
https://bugs.launchpad.net/kicad/+bug/1852444
The pointer passing for display options is deprecated. This removes the
excess casting as the EDA_FRAME didn't need the base call with no value.
All requests for display options are now returned const and are updated
with a Set() routine after modification.
In Gerbview, this resolves an issue where the display options were not
stored because it was receiving the NULL from EDA_FRAME.
* Make the events generated by the selection of context menu items
have the position where the menu was opened
* Ensure that TC_COMMAND type events have their position set to
be the cursor position where the event originated
In singletop mode, all frames show the "Quit" option in the file menu
and will quit on Ctrl-Q. When launched from the main KiCad interface,
sub-programs show the "Close" option instead and will close with Ctrl-W.
In this mode, Ctrl-Q will instruct the main program to exit.
Fixes: lp:1779938
* https://bugs.launchpad.net/kicad/+bug/1779938
Also changes the presentation of the string when the checkbox appears
so that the "Changes will be lost" warning isn't hidden by the turndown.
This last part may require conditional compilation as it's undocumented.
Lastly, regularizes the Unsaved Changes strings between the apps.
When exiting pcbnew, we only want to run the sections of ClearPcb that
remove the old pcb data. We do not want to queue events that handle
initializing a new pcb. These were caught after freeing memory in some
cases, leading to segfaults.
Fixes: lp:1831560
* https://bugs.launchpad.net/kicad/+bug/1831560
This is a stop gap fix. It should be possible to use the wxFrame title
string for this but some of the frame windows have appropriated the title
string for configuration file naming purposes which is less than ideal.
Fixes lp:1825977
https://bugs.launchpad.net/kicad/+bug/1825977
It was confusing that the primary frames registered their tools
differently than the other frames. In addition, since the other
frames also added their own tools, foo_actions::RegisterAllTools()
didn't really register all tool but rather those used by the
principal frame (PCB_EDIT_FRAME, SCH_EDIT_FRAME, etc.)