This introduces SIMPLE_OVERLAT_ITEM, which is an abstract EDA_ITEM,
designed for use as an overlay for assisting interactive tools.
The item is drawn only on the GP_OVERLAY layer, and sets the fill,
stroke and line properties before calling a virtual function to draw the
shape, which will depend on the implementaiton of the derived class.
The motivation here is to simplify and unify basic overlays used when
in interactive tools. It is not designed to be the base class of all
possible overlays - more complex ones would be more clearly represented
as their own derivative of EDA_ITEM.
Applications of this class can include: zoom/select rectangles, zone
polygon previews, geometric shape helpers, and so on.
The save current symbol command had a different code path then save current
library so the schematic symbol was not being refresh after is was modified
in symbol editor.
Split out the save current symbol command from Process_Special_Functions()
to help reduce function growth hormone imbalance syndrome.
Some coding policy fixes and wxT() macro removal.
Fixes lp:1671456
https://bugs.launchpad.net/kicad/+bug/1671456
Reenabled VIEW_ITEMs cache. Previously, the first init was called with
GAL_TYPE_NONE, causing all layers to be set to non-cached. During the
proper init, the layers were already set to non-cached and were not
changed.
- Stop wx from sorting the items. We've already sorted them, and
profiling shows our sort is faster than theirs.
- Go back to using strings as cache keys, because using pointers means
the cache doesn't survive from one invocation to the next. Switch to
wxHashMap because it can use wxString keys in an unordered (faster)
map.
The attached patch fixes a bug where triggering InlineDrag while routing
is in progress will crash pcbnew. The problem is that the InlineDrag
event does not terminate performRouting. Once InlineDrag is finished
it will call StopRouting which deletes the m_placer. The Wait() in
performRouting will then return and it will crash as soon as it tries
to access the m_placer.
When drawing polylines using SHAPE_LINE_CHAIN, the polyline is always
was drawn closed in GAL and open in Cairo, regardless of the state of
SHAPE_LINE_CHAIN.
This refactors COMPONENT_TREE_SEARCH_CONTAINER into a Model-View-Adapter
architecture comprising:
- eeschema/cmp_tree_model.h
- CMP_TREE_NODE: Base class representing a searchable library
set with scoring and sorting
- CMP_TREE_NODE_UNIT
- CMP_TREE_NODE_ALIAS
- CMP_TREE_NODE_LIB
- CMP_TREE_NODE_ROOT
- eeschema/cmp_tree_model_adapter.h
- CMP_TREE_MODEL_ADAPTER: mediator between wxDataViewCtrl (via
wxDataViewModel) and CMP_TREE_NODE*
+---+ +------------------+
+---+ Generates | A | | VIEW |
| M | from libs | D | wxDataViewModel |------------------|
| O | <---------- | A | <------------------> | wxDataViewCtrl |
| D | | P | |------------------|
| E | <---------> | T | <------------------- | wxTextCtrl |
| L | UpdateScore | E | UpdateSearchString() |------------------|
+---+ | R | | |
+---+ +------------------+
Representing the data with a proper model allows the wxDataViewCtrl to
be updated in bulk, which is significantly faster than the old method of
populating it one item at a time. This also adds flexibility if more
data is to be added in the future (which may come in handy with the
upcoming .sweet format, as that adds more ways components can be related
to each other).
Replacing the wxTreeListCtrl with a wxDataViewCtrl also significantly
reduces the general GUI quirkiness, as wxDataViewCtrl is much more well
behaved.
This is the right implementation of the commit b25ded4d.
Previously if there were tools launched from another tool,
the settings could be stored in a wrong TOOL_STATE object.
The base-devel package install was missing from the "MSYS2 The Easy Way"
section of the compiling developers document.
Fixes lp:1670067
https://bugs.launchpad.net/kicad/+bug/1670067