This is so that tools checking for a selected item won't think
the menu has been cancelled if the selection was in a submenu.
Fixes: lp:1758372
* https://bugs.launchpad.net/kicad/+bug/1758372
While we already cache the loaded footprint files, parsing said files
into the list is also time-intensive. Since the FOOTPRINT_LIST is
already hash-stamped against the current timestamps of the files that
make up the list, sharing a single copy of the list is quite
straight-forward.
Clearing bClError flag in NumericEvaluator::parseOk() made the
expression look valid, even if the flag has been set for a previous
token. Now it is cleared before an expression is parsed and verified
after parser finishes.
Fixes: lp:1756995
* https://bugs.launchpad.net/kicad/+bug/1756995
For some DRC checks, the location of the marker is not the location
of the first item in the resulting DRC_ITEM, so centering the screen
on PointA of the DRC_ITEM can be confusing.
DIALOG_SHIM stores the dialog position, so every time it is shown, it is
displayed in the same location. This caused problems on multidisplay
setups, as dialogs could show up off the screen if the original display
has been detached in the meantime, effectively making them inaccesible
to the user.
Fixes: lp:1756623
* https://bugs.launchpad.net/kicad/+bug/1756623
- changed EAGLE_UNIT enum names from EAGLE_* to EU_*
- renamed ToNanoMeters() to ConvertToNm() and added a comment
- added ToMils() and ToNanoMeters() method
It's too expensive to fetch the timestamps when the github
server is busy. See Dick Hollenbeck's comments at the top of
github_plugin.cpp for more info.
Also adds some safety to the other caching algorithms after
seeing github_plugin's wild-west usage of the kicad_plugin.
Fixes: lp:1753143
* https://bugs.launchpad.net/kicad/+bug/1753143
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.
Since we are going to inspect every item for these calls, we don't
need to use the RTREE search, which is expensive with high item count.
This results in ~50% improvement in layer switching time in GerbView
when working with a set of large Gerber files.
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
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.
Includes some dialog changes to go with the menu update.
Includes promoting the Pcbnew graphics mode back to main menu.
Includes renaming Graphics modes to Toolsets.
This should fix a bunch of bugs with run-time generated sizes
that can grow larger than their minimums in other configurations.
Also fixes a related bug in the WX_HTML_REPORT_PANEL where the
min size was set in the wrong place.
Fixes: lp:1692442
* https://bugs.launchpad.net/kicad/+bug/1692442
Move sketch mode stuff from Display Settings to View menu.
Move Icons in Menus from View menu to General Preferences.
Move Icon Scaling from Display Settings to General Preferences.
Regroup some items in both dialogs for better comprehension.
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
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
It affected just started tools that did not have cursor settings
stored, so could not be reverted after the context menu is gone.
Fixes: lp:1748613
* https://bugs.launchpad.net/kicad/+bug/1748613
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.
Many had already been fixed but weren't working on Mac because
of the DIALOG_SHIM hack (now fixed). Others hadn't been updated
yet. Also includes some cleanup for elipses in buttons and
layout.
Fixes: lp:1748506
* https://bugs.launchpad.net/kicad/+bug/1748506
Apparently calling wxDC::DrawEllipse() with parameters resulting in a
circle with radius equal to 0 lead to printing problems.
Fixes: lp:1746210
* https://bugs.launchpad.net/kicad/+bug/1746210
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
The fix for this is a crude hack. The assertion is caused by the fact
that KICAD_MANAGER_FRAME is not a KIWAY_PLAYER. The only way to fix
this correctly is to derive KICAD_MANAGER_FRAME from KIWAY_PLAYER so
the window ordering can be corrected and the dialog can be called using
ShowQuasiModal().
Fixes lp:1744228
https://bugs.launchpad.net/kicad/+bug/1744228
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
This fixes the layer comboboxes, the copper zones properties
dialog, and the differental-pair icon in the htoolbar.
Fixes: lp:1741049
* https://bugs.launchpad.net/kicad/+bug/1741049
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.
OSX activates windows before telling the application, so there's
no good way to implement wxWidgets window enable/disable. This
patch keeps the quasi-modal dialog and its parent windows order
in the z-list fixed, and re-activates the quasi-modal dialog
whenever the OS activates the parent window.
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.
Fixes: lp:1738875
This patch saves hotkeys to default file when a hotkeys file is
imported, so they remain persistent in future sessions.
Also, a few minor tidy ups (e.g. c++11 nullptr) internal to
common/hotkeys_basic.cpp.
- 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
The Windows drive specifier C: was being interpreted as a valid URL by
wxURI which was performing a URL comparison instead of a file comparison
which always failed in LIB_TABLE_BASE::FindRowByURI(). Change test for
URI to search string for "://" to determine if the comparison should be
a URI (string) comparison or a file (wxFileName) comparison.
Don't run final rescue unless the user performs the remapping.
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
Improve dialog layout and fix UI policy issues with all of the dialog
boxes in the common, 3D viewer, CvPcb, and Eeschema code paths.
Updated the use of component to symbol.
Replace all instances of "component" and "part" with "symbol" when
referring to schematic and library symbols.
Replace all instances of "component" with "footprint" when referring to
board and library footprints.
Minor dialog layout fixes to some of the dialogs impacted by the UI
string changes.
Remove redundant sizers from environment variable dialog.
Improve sizers and layout spacing of environment variable and environ-
ment variable edit dialogs.
Remove path from dialog box titles since environment variables are not
limited to file paths.
Improved help messages for both environment variable and environment
variable edit dialogs.
Restore highlighting of externally defined environment variables.
The remapping utility would create a new project specific library when a
symbolic link pointed to a library already defined in the symbol library
table. Now the comparison checks to see if the library path and file
name are actually a symbolic link if the file names are not the same when
the symbol library table entry is a file name rather than a URL. URLs
are simple string comparisons.
Disable the remap button after the remapping completed.
Remove some commented out code from the edit symbol in schematic dialog.
Fixes lp:1738634
https://bugs.launchpad.net/kicad/+bug/1738634
In theory there should be no polygons with empty outline, but as you see
there was at least one leading to a crash.
Fixes: lp:1739455
* https://bugs.launchpad.net/kicad/+bug/1739455
Don't apply missing-mouse-up logic to mouse-down events. The
logic depends on mouse-state, and the OS-synthesized mouse-up
and mouse-down events from a tap don't contain any state.
Fixes: lp:1737010
* https://bugs.launchpad.net/kicad/+bug/1737010
The polygon drawing routing in the OpenGL-GAL did
not plot polygons which are "closed", i.e. have a segment
from their last point to their first point, correctly.
That segment was omitted.
This commit fixes this bug.
The OSX implementation needs to be poked to update the
brightening / unbrightening during running of the
disambiguation menu. (FWIW, now that I've finally seen
it in action, it's a REALLY cool feature.)
Fixes: lp:1715440
* https://bugs.launchpad.net/kicad/+bug/1715440
The OPENGL_GAL::drawPolygon function and all functions using it
did not respect the isFillEnabled member set by
GAL::SetIsFill. This is fixed by this patch.
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.