Normal SetValue() call would temporarily change the displayed
value, but as soon as the text widget receives focus again, the original
expression (not evaluated) is restored.
To avoid this, the original expression is cleared in the associated
NumericEvaluator object.
If ',' is used as decimal separator by the current locale a '.' is also accepted.
Also add support for units "mi", "th" and "in" as described in the documentation of pcbnew.
Fixes: lp:1751315
* https://bugs.launchpad.net/kicad/+bug/1751315
Frame, dialog and config file couldn't agree on whether to use
internal units or not.
Frame now stores internal units, and they're now mapped on the
way in/out of the config file. Dialog was already assuming they
were stored in internal units (though they were previuosly not).
Fixes: lp:1751435
* https://bugs.launchpad.net/kicad/+bug/1751435
Too many external applications fail to touch the parent directory.
Also removes FP_CACHE_ITEM lastMod times and dirty flags as we've
always loaded libraries atomically anyway.
Claws back some of the performance lost by being more efficient
with cache management for sequential calls to Enumerate and then
Load.
Fixes: lp:1750936
* https://bugs.launchpad.net/kicad/+bug/1750936
Add a library selector to the save dialog. Initialize it to the
footprint's library. This way a straigh-up save will do what's
expected.
However, the user can still select the active library (or any
other library) if they really did want to move the footprint.
Fixes: lp:1750918
* https://bugs.launchpad.net/kicad/+bug/1750918
Also adds indicators in layers palette for feedback.
Also generates sized images for all indicators instead of using
scaled bitmaps (which didn't look great).
Also fixes a completely unrelated typo in a UI string.
Also fixes:
- forcing the annotation scope to "full schematic" when run
as a prerequisite to Generate Netlist.
- a long-standing bug where displaying extra items in a dialog
would mess up the height of the HTML_REPORT_PANEL (becasue
we were setting the html window's height rather than its
parent flexgrid.
- initializing the annotation radio buttons to safe values
(full schematic and keep existing)
Fixes: lp:1750062
* https://bugs.launchpad.net/kicad/+bug/1750062
NEW: add new align icons based on the existing align_items.svg icon, just flipped and rotated
CHANGED: change the context menu to use the new align icons
After Eagle project import, schematic and board netlists are inconsistent:
footprints do not have sheetpaths assigned, schematics are unannotated.
One can update netlist either by references or timestamps, but timestamps
are empty in pcbnew, and updating by reference must by preceded by
annotation which may lead to broken links between board and schematics
(Eagle does not require references to end with a number, so KiCad annotater
will add numbers in such cases).
To fix the problem, there is a two step netlist update:
- update by reference without the annotation step, to assign
correct sheetpaths to footprints
- update by timestamp, after symbols are annotated, in order to
update references in the board
Fixes: lp:1748502
* https://bugs.launchpad.net/kicad/+bug/1748502
All calls to {save,apply}ViewControls() have been replaced with a new
method: setActiveState(). The advantage is that setActiveState() always
saves view controls settings to the tool that set them. As long
as setActiveState() is called every time there is a tool context
switch, the changes are kept up-to-date.
Fixes: lp:1748613
* https://bugs.launchpad.net/kicad/+bug/1748613
Fixes a bunch of errors:
- libedit and libbrowser would zoom to bounding box but centre on canvas
- libedit, libbrowser and gerbview didn’t take the scroll bars into account
- pcbnew didn’t take scroll bars into account or apply the 10% margin
- appending a board file would re-centre, but not re-zoom
Fixes: lp:1504302
* https://bugs.launchpad.net/kicad/+bug/1504302
Second disambiguation menu was caused by another call to
SELECTION_TOOL::RequestSelection() meant to get the list of
connected tracks. When there were only footprints under the cursor,
it asked the user again to pick an item to remove.
Fixes: lp:1748521
* https://bugs.launchpad.net/kicad/+bug/1748521
Smartens the cache freshness checking, and adds checksums of
constituent-directory last-mod-dates to the footprint info
list.
Also inserts the dataPtrs into the list at the same time as
the text to keep wxWidgets from measuring the width of the
text twice (yes, really). And converts the list to default-
column widths in case the wxWidgets patch is present to
greatly speed list creation (by not measuring all that text).
On my machine drops the first-load time from 4s to 2.5s and
the subsequent-load times from 2.5s to < 1s. With the
wxWidgets patch subsequent-loads become near-instantaneous.
Launching right click context menu overrides the cursor position, so all
actions executed by the tools will be performed in the right click
position. It created an issue, as the overridden cursor settings were
saved into wrong context if there was another tool activated in the
meantime.
Current implementation saves cursor settings for all tools and restores
them once the right click context menu disappears.
Fixes: lp:1745981
* https://bugs.launchpad.net/kicad/+bug/1745981
Fixes: lp:1746507
* https://bugs.launchpad.net/kicad/+bug/1746507
Keystroke zoom (F1/F2) always centered the screen, because it
was handled as ID_POPUP_ZOOM_IN event. Mousewheel scrolling
was ok, because it is handled using different event based
on the configuration.
This patch introduces special event ids for keystroke
zooming that are then properly translated to either
ID_POPUP_ZOOM_IN or ID_OFFCENTER_ZOOM_IN depending
on the configuration.
The same issue is fixed for legacy canvas pcbnew.
Fixes: lp:1742567
* https://bugs.launchpad.net/kicad/+bug/1742567
Signed-off-by: Martin Sivak <mars@montik.net>
PICKED_ITEMS_LIST knows the architecture of the undo commands so
that it can delete those ITEMs which it owns. This represents poor
encapsulation so instead of adding yet another case, I added a
UR_TRANSIENT item flag which is set by callers whenever they create
new objects to “give to” the undo/redo stack. This allowed some
cleanup of other code, but cleaning up UR_DELETE and UR_WIRE_IMAGE
will be a bigger task and have to wait for another day.
Fixes: lp:1542018
* https://bugs.launchpad.net/kicad/+bug/1542018
The undo/redo operations are essentially the same as for
UR_CHANGED: we store both the origin marker item and a copy
of it and flip back and forth between the two. This also
required the implementation of clone() for the markers.
The ORIGIN_VIEWMARKER is moved from being a subclass of
EDA_ITEM to BOARD_ITEM to facilitate the use of a UR_CHANGE-
like implementation without having to know the internals
of the ORIGIN_VIEWMARKER.
In the command processors, the setting of the origins is
broken into two parts: one for UI-level access which includes
setting up undo, and one for low-level access which does not.
The undo/redo code itself of course uses the lower level.
Fixes: lp:1542018
* https://bugs.launchpad.net/kicad/+bug/1542018
It fixes the case when a tool sets up a menu and starts its event loop
waiting exclusively for menu events. If none arrived, the tool was stuck
in the loop forever.
Fixes: lp:1744915
* https://bugs.launchpad.net/kicad/+bug/1744915
This adds a set of conditions that will prevent a wire from being
automatically trimmed. Wires that are currently being moved or are
newly created or are explicitly avoided will not be removed. This also
adds a function to set a flag on items in a block.
Fixes: lp:1744632
* https://bugs.launchpad.net/kicad/+bug/1744632
Rename GetPolyPoint() to BuildPolyPointsList(), because GetPolyPoint() looks like an accessor, but it is not an accessor.
(Using it as accessor can creates a *very long calculation time* for very basic access to polygon vertices)
Fixes: lp:1745050
https://bugs.launchpad.net/kicad/+bug/1745050
Three interrelated issues:
1) Implement an undo/redo type for renames so that we know to delete
the old lib entry and add a new lib entry
2) When doing so (for the undo/redo OR the original edit), we must
make a copy of the 'original' LIB_PART which is used for revert, and
hand it to the new lib entry
3) When comparing a modified component tree item with the current item
we must also check for aliases.
Fixes: lp:1743857
* https://bugs.launchpad.net/kicad/+bug/1743857
Fixes: lp:1744371
* https://bugs.launchpad.net/kicad/+bug/1744371
Fixes: lp:1744373
* https://bugs.launchpad.net/kicad/+bug/1744373
Gal mode: graphic cross-air cursor moved on items when clicking on & DRC error, like in legacy mode.
Make popup menu shown when right clicking on a DRC error item working.
Major cleanup of many icons (started as a simple effort to tweak libedit and modedit icons)
Ref: https://lists.launchpad.net/kicad-developers/msg32860.html
* Each application icon has been updated
* Consolidated icon "modifiers" across many icons
* Replaced confusing arrows with "load" and "save" icons
* Slight code updates to reference correct icons
* Consolidate multiple representations of single icon type(s)
This is meant as a stopgap for 5.0, with plans to add proper scaled
icons in the 6.0 cycle. A function KiScaledBitmap() is added, which
works like KiBitmap() except it scales the bitmap according to the
calling window's font size. Controls have been added to all the main
applications to let the user select scaling manually (these were omitted
from smaller apps that didn't already have a place to put them).
In addition, in eeschema only, the pixel height of the system font is
shown in the options dialog for diagnostics. This is only for collecting
feedback before 5.0 release from users with different displays and will
be removed.
- Add helper methods for DPI-independent sizes
- Make splitter sashes visible on macOS
- Remove SetSizeInChars() - wx has a built-in way that I missed
- DIALOG_CHOOSE_COMPONENT: DPI-indep splitter sizes
- DIALOG_RESCUE_EACH: DPI-indep default size and sensible HTML window
size
- COMPONENT_TREE: DPI-indep sizing
- DIALOG_FP_LIB_TABLE, DIALOG_SYMBOL_LIB_TABLE
If the client tool indicates it isn't happy for us to continue
(because, for instance, the user has cancelled the Zone Properties
dialog), then make sure we don't capture the mouse.
Fixes: lp: 1740780
* https://bugs.launchpad.net/kicad/+bug/1740780
Move the OSX dialog fix ups later so they come after some wxWindow
deferred processing.
Also provides a facility for doing a selectAll in each text field
so that tabbing between text fields behaves correctly.
Fixes: lp:1599157
* https://bugs.launchpad.net/kicad/+bug/1599157
The "operator BOX2I() const" of EDA_RECT produced
wrong boxes, usually much to big. It passed its
end-position as second argument to the constructor
of BOX2I. However, BOX2I expects its size as second
argument.
This caused a dramatic performance penalty in some
cases.
There were two problems in the triangulation caching
of SHAPE_POLY_SET:
First there was a double free:
While SHAPE_POLY_SET implements the copy constructor,
it did not implement the operator=, which resulted
in the default operator= being generated by the
compiler. The default operator= copied the member
m_triangulatedPolys, which is a std::vector of pointers.
So after operator= execution, there are two SHAPE_POLY_SET
having pointers to the same TRIANGULATED_POLYGONs, each
of them deleting them in their destructors. This led
to segfaults, because calling
TransformShapeWithClearanceToPolygon on a Zone
uses operator= to copy the contained SHAPE_POLY_SET.
The new SHAPE_POLY_SET then went out of scope and
deleted the cached triangulation within the Zone.
This first problem is fixed by implementing operator=
for SHAPE_POLY_SET.
Second, there was a memory leak: Calling
"CacheTriangulation" on a SHAPE_POLY_SET,
then changing the polygon and then calling
"CacheTriangulation" again led to
leaking the
triangulations generated in the first call.
This second problem is fixed by holding
the cached triangulations in a unique_ptr.
Moved the code handling text overbars to a single function
(ProcessOverbars()) to replace similar pieces of code trying to do the
same thing.
Fixes: lp:1735906
* https://bugs.launchpad.net/kicad/+bug/1735906
In-class initializers for "static const" class members must be constexpr,
however std::string is only "static const" itself and cannot be used
without compiler extensions.