The accelerator strings really shouldn't be part of the translation,
and some translations have cause the accelerator keys to be incorrectly
handled. It is simpler to make it separate and just join them to the
translated string.
Make all accelerator modifiers use lowercased Ctrl instead of CTRL
to be the same as the other modifiers.
Fixes https://gitlab.com/kicad/code/kicad/issues/5992
This will always show 1 unit from each system, with the primary unit
being the current frame unit and the secondary unit being the
most recent unit used from the other system. These are saved in
the settings, so they are saved between runs.
1) use SCH_COMPONENT::GetRef(), GetValue() and GetFootprint() when
instance-specific info is needed
2) update UpdateAllScreenReferences() to handle value and footprint.
3) BACKANNO is CvPcb's handler, not back annotation's handler. Which
means it needs GUI behaviour, not back annotation behaviour.
Fixes https://gitlab.com/kicad/code/kicad/issues/5520
There was a regression in v6 where the zoom to selection toolbar
item wasn't canceling the tool when pressed and the tool was active
(it was in v5). This implements a more generic framework for canceling
tools on button presses.
Fixes https://gitlab.com/kicad/code/kicad/issues/5103
The use of printf, wxLogDebug, and std::err/std::out causes excessive
debugging output which makes finding specific debugging messages more
difficult than it needs to be.
There is still some debugging output in test code that really needs to
be moved into a unit test.
Add debugging output section to the coding policy regarding debugging
output.
* Frames moved: cvpcb, cvpcb footprints frame, gerbview, pagelayout editor
This also introduces new EDITOR_CONDITIONS that are used to set the
conditions of very common editor settings.
Also, some IDs were converted to tools in the pagelayout editor.
Various architecture upgrades to support this.
Creating a BOARD now requires a valid PROJECT, which caused
some (mostly transparent) changes to the Python API internals.
ADDED: Project local settings file
CHANGED: Board design settings are no longer stored in PCB file
CHANGED: Net classes are no longer stored in PCB file
CHANGED: Importing board settings now reads boards, not just projects
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2578
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4070
You can now choose the behavior of dragging with the
middle and right mouse buttons.
You can also choose which modifier keys to use for
panning and zooming with the scroll wheel or trackpad.
You can also customize the zoom speed, which makes
it possible to have a good zoom experience on a wider
range of input devices.
You can also now zoom by dragging with the right or
middle button if desired.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/3885
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4348
Using the infobar for errors doesn't steal focus from the cpvcb
main window when they are displayed like a dialog does, so it
allows for them to be visible without interrupting navigation
in the listboxes.
CHANGED: Cvpcb fpviewer and the pcbnew fpviewer no longer have an options dialog
ADDED: Add a side toolbar to the pcbnew footprint viewer (and the measure tool)
This also cleans up some of the settings structs in the viewers, since
it was somewhat confusing before.
Fixes https://gitlab.com/kicad/code/kicad/issues/2205
* Consolidate the measure tool into one tool (this gives cvpcb
unit changing and snapping capabilities in its measure tool)
* Transition cvpcb to use actions for the sketch modes
* Replumb how magnetic items settings are stored and used
* Push all sizing operations into EDA_BASE_FRAME
* Save the unmaximized window size when maximizing
so that we can then save it in the config if the
window is maximized. Otherwise the config ends up
with the maximized size saved, and weird behavior
occurs when unmaximizing on the next opening.
When pressing "Cancel" in Cvpcb's Footprint Assignment window, Cvpcb
discards changes without prompting the user. The comment suggests that
this behavior is intentional.
I have personally lost work due to this behavior when I tried to click
"Ok" and missed. Discarding changes without a prompt seems like a bad
idea anyway, so this stop doing that.
The only disadvantage is that it is now harder to open and close the
Footprint Assignment window without saving changes.
CHANGED: Settings are now stored in versioned sub-directories
ADDED: First-run dialog for migrating settings from a previous version
CHANGED: Settings are now stored as JSON files instead of wxConfig-style INI files
CHANGED: Color settings are now all stored in a separate settings file
CHANGED: The symbol editor and footprint editor now have their own settings files
CHANGED: Color settings are no longer exposed through BOARD object
CHANGED: Page layout editor now uses Eeschema's color scheme
Settings are now managed through a central SETTINGS_MANAGER held by PGM_BASE.
Existing settings will be migrated from the wxConfig format on first run of each application.
Per-application settings are now stored in one class for each application.
This also removes vector cover types which do nothing except obfuscate
the underlying implementation.
Mainly changes SCH_SHEET_PINS and CONFIG_PARAM_ARRAY (which will soon
be replaced by Jon's new stuff).
* Split up the thirdparty code into the thirdparty folder (#3637)
* Create a new kimath static library containing all the math functions
This is part of cleaning the build system for #1906.
Create an IsContentModified() function in each frame
that provides if the content has been modified, and
use that instead of always copying the checks.
* Make the grid display settings separate from the board object
* Ensure that the grid is initialized on creation in all the frames
Fixes: lp:1843169
* https://bugs.launchpad.net/kicad/+bug/1843169
The pointer passing for display options is deprecated. This removes the
excess casting as the EDA_FRAME didn't need the base call with no value.
All requests for display options are now returned const and are updated
with a Set() routine after modification.
In Gerbview, this resolves an issue where the display options were not
stored because it was receiving the NULL from EDA_FRAME.
* ESC no longer closed the window since it didn't properly generate
the close event
* Copy/Cut from a context menu did not work due to a focus-loss issue
* Add better error handling for the copy/cut/paste actions to prevent
text that isn't an FPID from being inserted
This function calls Pgm(), but when running from a script (not from kicad) Pgm() uses a nullptr reference.
The nullptr reference is now tested in ComputeBoundingBox()
* Push a function into CONDITIONAL_MENU that adds the item
* Modify the tooltip for close and exit items to have the
program name
Fixes: lp:1835454
* https://bugs.launchpad.net/kicad/+bug/1835454
The problem is that wxEVT_CHAR_HOOK doesn’t do the key translation
properly. wxEVT_CHAR does, but we only get to that if we skip the
event at the end of the tool’s event processing loop, which most tools
don’t do. (Selection tools, point editors, pickers, and a couple of
others do skip, which is probably why this didn’t get reported earlier.)
I played around with a couple of ways to fix wxEVT_CHAR_HOOK. Most of
them don’t work, and the few egregious hacks I tried weren't cross-
platform.
So I’m changing it so that most tools now skip at the end of their
event loops. I left out a couple that I felt were high risk (length
tuning, for instance). But there’s still enough risk that I’m 100%
sure it will break something, I just haven’t a clue what.
Fixes: lp:1836903
* https://bugs.launchpad.net/kicad/+bug/1836903
Includes the addition of an onSetCursor() handler which must be called
from both the GAL canvas AND the GAL backend (at least on OSX) to prevent
cursor flickering between (for instance) pencil and arrow.
Also includes new architecture for point editors which allows them to
coordiate cursors with the editing tools (so we can switch to an arrow
when over a point).
We were running into various corner conditions where a tool's event
loop would exit while the tool was still active, or the tool would
get popped while we were still in the event loop. (A lot of these
had to do with the POINT_EDITOR's, but not all of them.)
The new architecture:
1) tools always do a Push()/Pop()
2) everyone is responsible for their own pops; no more stack-clearing
on a cancel
3) CancelInteractive events go to all tools to facilitate (2)
Also changes the presentation of the string when the checkbox appears
so that the "Changes will be lost" warning isn't hidden by the turndown.
This last part may require conditional compilation as it's undocumented.
Lastly, regularizes the Unsaved Changes strings between the apps.
It's a bit of a hack because they're statically initialized and
so we can't make use of the _() macro. We do still want it in the
code, however, because the string harvesting is based off of it.
Fixes: lp:1833000
* https://bugs.launchpad.net/kicad/+bug/1833000
DIALOG_EXIT was not being laid out correctly after setting the dialog
message. Rather than fix our custom DIALOG_EXIT, wxMessageDialog and
wxRichMessageDialog were substituted as direct replacements for all
of the variants of DIALOG_EXIT. This make message dialogs appear more
consistent because wxMessageDialog uses the default platform message
dialog and wxRichMessageDialog uses the default platform rich message
dialog on windows.
Remove DIALOG_EXIT_BASE as it is no longer required.
Fixes lp:1832899
https://bugs.launchpad.net/kicad/+bug/1832899
If a tool called something like clearSelection while processing a
MOUSE_CLICK, the SELECTION_TOOL will pass the clearSelection
COMMAND_EVENT because it handles it as a transition, not as an
event. Because m_passEvent is effectively global, the tool manager
would then interpret that as passing the MOUSE_CLICK and we'd end
up processing the click by multiple tools.
Return the EDA_DRAW_FRAME class back to common, whence it came (before it was
duplicated into legacy_wx and legacy_gal). Now there is only one
implementation (the GAL one), it doesn't need to be in a separate library.
This simplifies the dependencies for common lib users.
The iterators are not removal safe outside of the class. We provide a
safety clear function that frees the associated memory.
Fixes: lp:1831465
* https://bugs.launchpad.net/kicad/+bug/1831465
It was due to the fact the frame size was set before the draw canvas panel was created,
thus creating incorrect size of the other panel (the message panel)
Fixes: lp:1831389
https://bugs.launchpad.net/kicad/+bug/1831389
It was confusing that the primary frames registered their tools
differently than the other frames. In addition, since the other
frames also added their own tools, foo_actions::RegisterAllTools()
didn't really register all tool but rather those used by the
principal frame (PCB_EDIT_FRAME, SCH_EDIT_FRAME, etc.)
This allows us to make the various netlist and pcb update routines
more atomic and less reliant on carefully sequenced asynchronous
messages.
This is also a prelude to adding support for footprint testing
without a netlist.
Bug #1807567 states the entering 's' in the string search textbox does
not get passed to the text box correctly when in the German language
under windows. This likely means that the main window is firing wxSave
when it detects the 's' key. By adjusting the id for the save and
continue action, we hope to allow the signal to pass through to the
textbox. This commit should otherwise be a NOP.
N.B. This appears to be the result of hooking wxEVT_CHAR_HOOK into
EDA_DRAW_PANEL::OnKeyEvent() (commit
53b1ec8146) that reverses the cascade of
events from bottom up rather than top down. Fixing that is a longer
project and will likely be a side effect of switching fully to the new
tool architecture.
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.
wxChoice centers the selection on GTK. So when switching from a
mid-list item to an item at the top, the list is always cut off for
choice lists located on the top toolbar. Using a combobox provides a
drop-down that allows easier access to all elements in the box.
Fixes: lp:1808569
* https://bugs.launchpad.net/kicad/+bug/1808569
Fix highlight not cleared by Pcbnew.
Fix highlight not cleared by Cvpcb (missing code).
Add comments. Remove a few now useless printf used for debug
When clicking on a empty area, clear any highligthed symbols
Fixes: lp:1809977
https://bugs.launchpad.net/kicad/+bug/1809977
Put the cursor and pan control TOOL_ACTIONs in ACTION,
and refer to them in that way.
The handlers are currently identical in Pcbnew and Cvpcb,
and Gerbview (and all canvases) can benefit from them as well
if they are in libcommon. Also saves duplicated code.
Fixes: lp:1795855
* https://bugs.launchpad.net/kicad/+bug/1795855
This commit finishes the removal of OpenMP from the KiCad codebase.
Removed in this commit are the OpenMP calls in 3d-viewer and
qa/polygon_triangulation as well as all references in CMakeLists.txt
std::thread is used instead for multithreaded computation
Add Display Settings to Footprint Browser.
Make each of them OpenGL on OSX and Cairo on other platforms.
Allow auto-zoom to be turned off and save last zoom setting.
Make ordering of tools in htoolbar consistent.
Standardize grid and zoom drop-downs.
Fixes: lp:1791667
* https://bugs.launchpad.net/kicad/+bug/1791667