Crash was caused by removal of the selected item from the
wxDataViewModel, which was later accessed in
COMPONENT_TREE::GetSelectedLibId(). To avoid the problem, the selection
is validated before regenerating the tree widget.
Fixes: lp:1740952
* https://bugs.launchpad.net/kicad/+bug/1740952
This commit is a partial revert of aa81f5b9 & 445ac505. LIB_ID should
not be modified when a library is assigned to its part, as the library
nickname cannot be evaluated during the assignment and might be
different than its filename.
Fix a bug where the full LIB_ID was not being used to look up the name
of the symbol in the cache library preventing the rescue to work when
rescuing symbol library table projects.
Add information as to why a symbol was rescued rather than only showing
what symbols were rescued.
Do not add rescue suffix to symbol name for symbol library table rescues
because if a symbol name exists in multiple libraries that need rescued
at the same time will cause subsequent symbol rescues to be overwritten.
Append the nickname of the schematic symbol library to prevent symbol
name clashes in the rescue library.
Verify the library symbol of the field being edited still exists rather
than use an assertion because it is entirely feasible that the library
symbol or library containing this symbol has been deleted and will cause
a segfault. Unfortunately there is no way to determine if the symbol is
a power symbol or not so just set it as a regular symbol so the user can
still edit the schematic symbol field.
Fixes lp:1742111
https://bugs.launchpad.net/kicad/+bug/1742111
When a LIB_PART object is removed, it deletes all of its aliases.
When the last one is removed, it tries to report the name of the
parent part, but as it has no aliases - it cannot return a valid name.
Use the symbol found in the library when the symbol is not in the cache
library.
Add an assert to prevent dereferncing a null pointer in the future even
thought this should not happen as the rescue algorithm does not add a
candidate when a symbol cannot be found in either the cache or any other
library.
Fixes lp:1741964
https://bugs.launchpad.net/kicad/+bug/1741964
Calling wxListBox::SetSelection( wxNOT_FOUND ) changes the internal
state of the widget without the intended visual effect (show nothing
selected). It leads to a situation when the default choice is overridden
with wxNOT_FOUND, even though the list box shows a valid value.
As there is no point in calling wxListBox::SetSelection( wxNOT_FOUND ),
the confusing call has been removed.
Dialogs displaying a lot of scrollable data should use SetSizeInDU()
instead, as FinishDialogSettings() will set a minimum size equal to
whatever can contain all the data (making it overflow the screen for
large amounts).
- 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
CHANGED: When a workbook file is saved from the simulation dialog
in eeschema, the extension is automatically added if it is not
specified. This behaviour is consistent with the workbook loading
dialog, which filters the filelist for only ".wbk" files with no
"all files" option.
Change term "Flip Horizontal" to "Mirror About Horizontal(X) Axis" in
the schematic editor symbol context menu to improve clarity.
Change term "Flip Vertical" to "Mirror About Vertical(Y) Axis" in the
schematic editor symbol context menu to improve clarity.
Change to the same mirror terminology in the block context menu.
Change "Exchange Footprint" to "Change Footprint" in the board footprint
context menu for improved clarity.
Fixes lp:1740593
https://bugs.launchpad.net/kicad/+bug/1740593
Create separate folder in project path to backup files changed during
remapping.
Add time stamp to backup file names in case multiple remappings are
performed.
Add backup file information to report panel instead of using debug
trace messages.
Disable the remap button if the user does not have write privileges to
the current project path.
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.
When an attempt to resolve a library symbol link having a library
nickname that was no longer found in the symbol library table, the
symbol resolution was not falling back to the cache library due to
a silently handled exception. Add check for valid symbol library
table nickname before attempting to resolve symbol link to prevent
exception bypassing falling back to the cache library.
Fixes lp:1740609
https://bugs.launchpad.net/kicad/+bug/1740609
A new legacy symbol library plugin deletes all of the aliases from each
LIB_PART object that it owns cause an assertion in the dtor which calls
GetName() which checks for an empty alias list to prevent a segfault.
Remove the call to GetName() from the dtor trace message.
Fixes lp:1740597
https://bugs.launchpad.net/kicad/+bug/1740597
Store the currently-edited item in the base screen class
instead of the libedit_frame. This allows us to access it
for double-click disambiguation and harmonizes the library
editor with the schematic editor code that already does this.
Fixes: lp:1738694
* https://bugs.launchpad.net/kicad/+bug/1738694
The GetName() method attempts to access the first LIB_ALIAS pointer in
the m_aliases member without checking if m_aliases is empty. This
should never happen because a new LIB_PART creates a LIB_ALIAS object
in the ctor. Some how, this is getting bypassed and causing Eeschema
to crash in the LIB_PART dtor on debug builds. GetName() now checks
for an empty alias list to prevent a null pointer segfault.
Fixes lp:1739614
https://bugs.launchpad.net/kicad/+bug/1739614
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.
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
Allows buses to acquire junctions based on their connections. Buses
can only have junctions with other buses. Also allows buses to be
draggable junctions for collections
This adjusts the selection addition criteria for
blocks to allow items such as labels to connect to
lines not at the endpoints. It also uses the same
logic to correctly gather bus-wire, bus-bus entries.
Fixes: lp:1738941
* https://bugs.launchpad.net/kicad/+bug/1738941
Apparently explicitly requesting a column to be sorted breaks component
filtering on Windows. Without SetSortOrder() call the list is sorted and
filtering still works as expected.
Fixes: lp:1739412
* https://bugs.launchpad.net/kicad/+bug/1739412
Please never ask me about the SetSortOrder() part. When it is set to
'true', wxDataViewCtrl::EnsureVisible() does not always work correctly,
so sometimes the best search result is not shown in the window (no
pattern found). Now it is set to 'false' to avoid the described
behavior, but the sorting order is reversed on Windows, not on Linux.
I could not test it on OSX, but I am sure it paints walls in your room
pink. /me burst into tears.
Fixes: lp:1738696
* https://bugs.launchpad.net/kicad/+bug/1738696
Enable "save curr lib" tool of main toolbar when modified even if this lib is empty.
It happens when all items are erased, and it is consistent with the close libedit dialog
that ask for saving all modified libraries
Standalone eeschema did not have the project path set when importing
a non-KiCad sheet. Due to this any libraries created during the import
were saved to the directory of eeschema executable instead of the actual
schematic directory.
The previous implementation relied only on the project name. When it is
set, the imported library was named '-eagle-import'. Now it tries
the project name and then the file name, using 'noname-eagle-import'
as fallback.
The library name is stored in the plugin to avoid changing the library
name after the project name has been set.
Marks wire-bus entries as not dangling if there is at least a wire
and a bus on each end. Corrects behavior when wires and buses overlap
at the endpoint.
The reason the component tree widget was cleared on Windows is the fact
m_adapter->UpdateSearchString( m_query_ctrl->GetLineText( 0 ) ) is
called on any change of the symbol. But if m_query_ctrl is empty,
m_query_ctrl->GetLineText( 0 ) returns the "hint" (currently the word
"Search") not the actual value, so there is no "candidate" symbol in
list. Using m_query_ctrl->GetValue() returns the actual value and fixes
this issue.
Fixes: lp:1737132
* https://bugs.launchpad.net/kicad/+bug/1737132
Pins are weak_ptrs to the library, so they require a lock() before
accessing. This imposes a performance hit on fast loops that access
the pin list repeatedly. This patch caches the pin position locally
for each component, updating only when needed.
Fixes: lp:1737363
* https://bugs.launchpad.net/kicad/+bug/1737363
COMPONENT_TREE::STATE used wxDataViewItem to store the selection, but it
will point to a deleted object if the selection was removed. Switched to
storing the selection using LIB_ID as it is much safer to use.
Show the NC box only on pins connected via the same component,
indicating a stacked pin group. Do not show NC box on pins for
different components with the same symbol.
If a schematic contains two symbols with the same name from different
libraries, the cache will contain the last symbol saved with that name.
Prepend the library nickname with the original schematic symbol library
nickname when saving the cache library to prevent name collisions.