The folder button handler works will for footprint libraries but we
needed a specific class for the schematic libraries as well.
Fixes: lp:1818346
* https://bugs.launchpad.net/kicad/+bug/1818346
The pin on grid test always used a fixed grid spacing of 25 mils. The
change uses the current grid setting for the on grid test. Grid sizes
below 25 mils are clamped to 25 mils to prevent issues when connecting
wires to pins in the schematic editor.
Fixes lp:1817896
https://bugs.launchpad.net/kicad/+bug/1817896
For unknown reasons, GTK3 may send resize events when editing grid
fields. This can cause the grid editor to exit, losing the focus and
overwritting the characters at the next input.
We avoid this by filtering the size events when the size doesn't change.
Fixes: lp:1817810
* https://bugs.launchpad.net/kicad/+bug/1817810
For some reason, changing languages was causing the options (left) toolbar
to get redrawn with some of the main toolbar entries. Changing the window
size causes the toolbar to be redrawn correctly. The normal call to
function wxWindow::Refresh() does not.
Fixes lp:1816492
https://bugs.launchpad.net/kicad/+bug/1816492
In Symbol editor, axis are always shown. However after switching the backend, axis were no longer drawn.
In Cairo engine, fix a bug preventing axis to be shown.
While modifying elements in eeschema/libedit, they are overdrawn on the
rest of the schematic. This prevents alignment with existing elements
as the underlying elements are not visible. We set a slight
transparency on elements while being modified to allow the user to view
existing elements at the same time.
Fixes: lp:1817233
* https://bugs.launchpad.net/kicad/+bug/1817233
Introduce a shortcut method to set tab ordering and use it in
the dialogs that override the tab traversal orders:
* Eeschema sheet properties
* Pcbnew Move exact
* Pcbnew Move relative
Also set some initial focus fields in the same dialogs.
Tidy a few includes.
Fixes: lp:1816009
* https://bugs.launchpad.net/kicad/+bug/1816009
Move the class DIALOG_EDIT_COMPONENT_IN_SCHEMATIC to its own
header, and move the SCH_EDIT_FRAME::EditComponent out of the
dialog implementation file. Thus, users of the dialog are
coupled only by the dialog header, as usual.
Also tidy some includes and comments.
In DIALOG_EDIT_COMPONENT_IN_SCHEMATIC, the Cancel button is
connected to a dedicated handler to deal with the footprint
browser widget. DIALOG_EDIT_COMPONENT_IN_LIBRARY should have
the same logic.
Fixes: lp:1816636
* https://bugs.launchpad.net/kicad/+bug/1816636
Click to add/edit footprint filters under MSW requires handling the
listbox double click first before the item is handled.
Fixes: lp:1816182
* https://bugs.launchpad.net/kicad/+bug/1816182
This (aside from getting both parts into a single undo stack item)
will ensure that we clean up both parts on an abort.
Fixes: lp:1816284
* https://bugs.launchpad.net/kicad/+bug/1816284
gal: pixel alignment for Cairo.
gal: pixel alignment for OpenGL
Cleanup of pixel alignment patches
gal/opengl: more pixel alignment patches:
- works on Retina displays now
- pixel alignment for circles
- correct 1-pixel strokes
- fixed unfinished 1-pixel line ends
GAL: Restore antialiasing options in Cairo
GAL: Fix arc drawing
Removes DrawArcSegment, which drew arcs whose edge was optionally
stroked (a feature that we did not use). Fixes Cairo arc drawing issue
where arcs were not visible in pcbnew.
gal: further cleanup
gal: removed unused shader parameter
Clearing the cache removes all items from screen until the cache is
refreshed. Instead, we wanted to re-cache the items to take into
account the bitmap changes.
Fixes: lp:1815443
* https://bugs.launchpad.net/kicad/+bug/1815443
This places the Delete markers/Run/Close buttons at the bottom of the
form rather that inside the panel. Allows the user to access the
functions even when on a different panel.
Fixes: lp:1815102
* https://bugs.launchpad.net/kicad/+bug/1815102
When loading a part in libedit, also transfer certain screen
settings to the incoming SCH_SCREEN, from the current
SCH_SCREEN.
Currently, the grid settings are transferred, but this could
also do other settings if needed.
Also remove some duplicate commentary and mention why the
grid is set in a SCH_SCREEN even though the BASE_SCREEN ctor
sets the same default.
Fixes: lp:1815108
* https://bugs.launchpad.net/kicad/+bug/1815108
Do not keep pointer to SCH_EDIT_FRAME in the rescuer object to prevent
it from creating dialogs with itself as the parent when call from the
rescue dialog which is itself a grandchild of the frame window.
* Make LIB_TABLE_BASE::GetCount() return unsigned. This is more
consistent with the behaviour of STL containers (especially the
boost::ptr_vector this is really accessing). Sadly
wxGridTableBase() forces an int, so a cast is still required
at the WX interface.
* Make LIB_TABLE_BASE::At() return a reference. First, this is more
consistent with normal STL indexing operator[]'s, and secondly, it
allows an idiomatic const index method (so you can access const
LIB_TABLE_ROWs from a const LIB_TABLE_BASE).
The motivation is to allow use of this class and LIB_TABLE_ROW
in a test program, where the LIB_TABLE_BASE is const.
Libpolygon can provide its own includes via target_include_dirs PUBLIC.
This means any linking targets do not need to specifiy them manually.
As common requires polygon, the polygon dep is also now no longer
required downstream of libcommon, as it's transisitvely implied
by libcommon's target_link_libraries.
This resolves a circular dependency previously detected and also
simplifies CMakeLists.
The bitmap definitions (BITMAP_DEF and so on) do not
have any dependencies on other libs, including WX. This
means the bitmaps library can be isolated from the other
dependencies.
Common now depends on bitmaps, and libraries that depend
on common can pick it up from the common target_link_libraries,
as it is PUBLIC. This means a lot of targets no longer
need manual bitmap linkage.
This avoids a circular dependency that was previously reported
by static analysis.
Avoiding pulling in WX and other headers into the include
tree of each bitmap .cpp is a huge speed up (around 10x) in
compilation, and the generated static library is also 10x
smaller (20MB vs 200MB)
Add common as a link library to pnsrouter,connectivity.
THese library do still use common code (including bitmaps,
via base_screen.h) and this allows them to pick up the libcommon
includes correctly.
Using the quantity column for the collapse/expand controls feels too odd
when you expand and everything under the parent is a '1'.
Fixes: lp:1780847
* https://bugs.launchpad.net/kicad/+bug/1780847
When creating new lib table rows, the pointer becomes managed by the new
table through the boost::ptr_vector. The row is non-copyable, however,
so we lose the reference as soon as it goes out of scope. Creating a
clone provides a new pointer that is moved into the table on creation.
Fixes: lp:1792456
* https://bugs.launchpad.net/kicad/+bug/1792456
Assignment of columns was offset based on the quantity column. This
cleans the implementation as well as setting the correct width
Fixes: lp:1814380
* https://bugs.launchpad.net/kicad/+bug/1814380
Eagle can label nets independently of the connection point position. In
an "interestingly" designed circuit, this can lead to a junction of a
pin, wire endpoint and unrelated wire. While this is bad practice,
KiCad shouldn't force an incorrect net connection during the import. In
this case, we skip the addition of junctions to ensure that we don't
create a schematic error.
Fixes: lp:1788019
* https://bugs.launchpad.net/kicad/+bug/1788019
Uses existing grouping in SVG output. Sets schematic components as a
grouped element in SVG as well as pcbnew elements per layer.
Fixes: lp:1011754
* https://bugs.launchpad.net/kicad/+bug/1011754
This breaks the following functions out to a general-purposed refdes utils
header:
* MODULE::GetReferencePrefix()
* kicad_string.h RefDesStringCompare()
This acheives:
* Slimming of MODULE interface
* Placement of refdes code in common rather than pcbnew
** Testing of this code in qa_common
* Tighter and smaller includes for code that only needed refdes functions
Note: there are failing tests commited (as expected failures). These
are the cause of lp:1813669 and will be fixed as a follow-up commit.
Symbol fields uses a custom expander control. This should be tied to a
column that cannot be hidden in order to ensure the ability to view sub
elements remains intact, like the standard control.
Fixes: lp:1780847
* https://bugs.launchpad.net/kicad/+bug/1780847
When no default library tables are found, set the default wxFilePickerCtrl
to the users configuration path instead of the current project path to
prevent any project library tables from being used as the default.
Fixes lp:1809769
https://bugs.launchpad.net/kicad/+bug/1809769
Spacing text for plotters uses the thickness of text for two separate
classes. This sets the thickness in the EDA_TEXT class as well to allow
the multiple line positions to be correctly set
Fixes: lp:1799605
* https://bugs.launchpad.net/kicad/+bug/1799605
When starting Eeschema, or a frame/dialog using a SCH_DRAW_PANEL, the bg color was initialized too late,
thus creating a flicker or an annoying draw artifact (in SYMBOL_PREVIEW_WIDGET for instance) if a Paint event
is fired before the right bg color is initialized.
Initializing the bg color earlier fix this issue.
Fixes: lp:1797203
https://bugs.launchpad.net/kicad/+bug/1797203
Factor out common dialog code from global symbol library table dialog for
loading initial library table.
Update global symbol library table code to user factored out common dialog
code.
CHANGED: First click sets a cursor to the specified cell, second click
activates editor (current realization, where first click activates cell
editor, is very buggy especially with cells selection).
Set cursor on cell of reference on mouse left click in Fields editor of
Eeschema.
On clicking a reference cell in the field editor of Eeschema a
corresponding component is highlighted in Eeschema. But previously
highlighted components are staying highlighted.
With current patch all highlightings are cleared before highlighting
selected component.
Prevent obvious scale issues (0.0, nan, etc) from corrupting display of
schematic images. In these cases, we reset the scale value to 1.0 and
allow the user to input the appropriate value when editing the
schematic.
Fixes: lp:1811066
* https://bugs.launchpad.net/kicad/+bug/1811066
The canvas type might change without the frame being notified. If this
happens, the user is presented with repeated notifications of OpenGL
issues. Howver, switching canvas is not an error and should be
presented to the user as an info message to clarify that the system is
still working but it has changed how it renders the screen.
Fixes: lp:1795240
* https://bugs.launchpad.net/kicad/+bug/1795240
Use the AddFileExtListToFilter() to also generate the
wildcard for "all files". This is because:
* Users can use AddFileExtListToFilter for the all files WC
with the same interface as for any other extensions.
* Users do not need to worry about wxGetTranslation, as the
_() is applied in the same way as the other *Wildcard() helpers,
and it is a function just like the others, so it is consistent
* There is a testable interface to document the expected result.
The test is added.
The default filename textbox confusingly could not be edited and the
checkbox for "Use default filename" would also use a default location.
As the netlist export is no longer required in the workflow, we can
simplify the layout to always show the user the file save dialog
allowing them to choose the location and name of the exported netlist
file.
The standard DIM() macro was not typesafe as it happily deferred errors
to runtime that can be caught at compile time. Replacing it with a
generic C++11 constexpr allows for typecasting, comparison and compile
time error checking.
wxWidgets provides a system-dependent string for "*" or "*.*" depending
on the system. Unfortunately, wxFormBuilder does not use this and
instead defaults to the Windows-only "*.*". This is an ugly work
around.
Fixes: lp:1810221
* https://bugs.launchpad.net/kicad/+bug/1810221
The hotkey name "Help (this window)" does not describe what the hotkey
and associated action does. It displays the current hotkey list, so the
action name should reflect that behavior