Mark Roszko
7bdb98f961
libedit: Make context menu follow context
2020-07-26 20:16:38 +00:00
Ian McInerney
50b2271f84
Fix missing variable initialization
2020-07-18 23:56:39 +01:00
Jeff Young
3fd0a3f842
Update text variables even when they're changed from other binary.
...
For instance, you might have PCBNew open but change the variable
value through EEschema > Schematic Setup.
Fixes https://gitlab.com/kicad/code/kicad/issues/4918
2020-07-17 21:05:11 +01:00
Jeff Young
e9da02e2d5
Only reserve hotkeys for focused textCtrls that are editabled.
...
Otherwise just send Ctrl-C to the disabled control, and everything
else to the tool framework.
Fixes https://gitlab.com/kicad/code/kicad/issues/4801
2020-07-14 13:30:43 +01:00
Jeff Young
940570e9ec
Catch exception so that we at least throw up an error message.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/4677
2020-07-13 22:41:56 +01:00
Jon Evans
5d118b0700
More visibility settings infrastructure
...
ADDED: Three-state high contrast mode action
ADDED: Save contrast mode in local settings
Also some initial infrastructure for layer presets
2020-07-11 21:59:07 -04:00
jean-pierre charras
3993181de5
D_PAD::BuildEffectiveShapes(): fix incorrect rect shape size for rect pads
...
rotated by +-90 deg
Noticeable in PnS router.
Fixes #4771
https://gitlab.com/kicad/code/kicad/issues/4771
2020-07-01 16:06:31 +02:00
Ian McInerney
fb10406e67
Add right-click context menus for toolbar items
2020-06-26 21:29:03 +00:00
Ian McInerney
52856a8ce4
Move scaled toolbar separator into ACTION_TOOLBAR
...
* Ensure all separators are scaled separators
* Clean up toolbar creation functions
2020-06-26 21:29:03 +00:00
Jeff Young
5ee806c3a3
The dispatch-behind & whitelist stuff got broken again, so I've
...
retired them in favour of a much dumber hack that special-cases
only ctrl-U for units switch.
2020-06-24 12:22:42 +01:00
Jeff Young
18ab3c4714
Fix missing user grid in COMMON_TOOLS.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/4702
2020-06-23 11:17:15 +01:00
Jon Evans
713cd4a47a
Point editor: show dragged points with a highlight
...
Take points editor colors from color theme
Also fix an issue where the edited object sometimes didn't
update when a point is dragged.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4600
2020-06-21 14:43:41 -04:00
Jeff Young
a1332d76fe
Remove SHAPE_EDITOR frame types before we forget about them.
...
They may go back at some point, or they may not....
2020-06-19 14:10:41 +01:00
Jeff Young
cae493fe65
More infrastructure work for shape editor.
2020-06-18 15:38:01 +01:00
Jeff Young
754f958be2
Attempt to fix duplicate ID issue on MSW.
2020-06-17 18:44:39 +01:00
jean-pierre charras
5db2b6ed8d
Action menu: ensure a wxEVT_COMMAND_MENU_SELECTED event is sent to the menu,
...
when a wxTextCtrl has the focus but is read only, and cannot use a CHAR event.
It fixes an issue in Kicad manager (menus with accelerator not working) when
the wxTextCtrl window showing messages has the focus.
2020-06-17 12:00:34 +02:00
Jon Evans
0dd34d197e
Ensure currentGrid is valid on startup
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4666
2020-06-16 19:59:00 -04:00
Seth Hillbrand
a18aea3a43
Fix signed/unsigned comparison
2020-06-15 12:40:02 -07:00
Jeff Young
ad12c42e8b
Push grid settings dialogs down into common.
...
This also gives support for fast grid switching and a user grid
to eeschema.
Fixes https://gitlab.com/kicad/code/kicad/issues/2200
2020-06-14 19:26:37 +01:00
Jeff Young
998fe12a5a
Make sure COMMON_TOOLS initializes the grid.
2020-06-13 22:44:16 +01:00
Jeff Young
c48f4272f3
Collapse a level out of the zoom settings.
...
The APP_SETTINGS_BASE now holds the list of zoom factors, and
the old legacy (screen-based) code has been removed.
2020-06-13 22:44:16 +01:00
Seth Hillbrand
a02d8a5993
Fix a number of signed/unsigned comparisons
2020-06-13 11:55:59 -07:00
Jeff Young
f84406009b
Push a couple of layers of indirection out of grid settings.
2020-06-13 11:35:56 +01:00
Ian McInerney
4357c1d3b3
Coverity and compiler warning fixes
...
* Initialize variables
* Test dynamic casts
Fixes https://gitlab.com/kicad/code/kicad/issues/4620
2020-06-05 12:50:56 +01:00
Jeff Young
b274b9f972
Fix type-checking which was too tight.
...
Also fixes a typo leaving the return statement in the wrong place.
Fixes https://gitlab.com/kicad/code/kicad/issues/4611
2020-06-04 22:35:01 +01:00
Johannes Pfister
8e8979e317
Fixed a memory leak in CONDITIONAL_MENU
...
CONDITIONAL_MENU::ENTRY now owns the wxItem object.
2020-06-04 19:08:59 +00:00
Jeff Young
0741bbb1b9
Move autocomplete to the remove filtered items paradigm.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/4190
2020-05-30 20:09:09 +01:00
Jeff Young
449c90a0ae
Some more work on getting wxWidgets to stop stealing textEntry keys.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/1941
2020-05-30 12:32:33 +01:00
Jon Evans
fbef52ec33
Don't process hotkeys on text entries
...
Thanks @jeffyoung for the suggestion
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4463
Fixes https://gitlab.com/kicad/code/kicad/-/issues/1941
2020-05-29 21:20:44 -04:00
Jeff Young
112316cdfb
Fixup kiway by hand when dynamic_cast fails.
...
Also allows a shortened version of Configure Paths without the 3D
paths when Pcbnew isn't already running.
Fixes https://gitlab.com/kicad/code/kicad/issues/4568
2020-05-29 22:06:48 +01:00
Jon Evans
695cdbbde8
Move bug reporting to COMMON_CONTROL; add to Help menu
...
Also make a shorter version of the version info string
and some other shortening edits to the issue template
to fix occasional 500 errors thrown by Cloudflare due
to excessively long URLs
Fixes https://gitlab.com/kicad/code/kicad/-/issues/3953
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4272
2020-05-26 21:18:32 -04:00
Ian McInerney
a6e9efbe57
Add icon for schematic reverse annotation
...
Fixes https://gitlab.com/kicad/code/kicad/issues/4527
2020-05-24 12:13:48 +01:00
Ian McInerney
c7e512852a
Fix escape key event propagation regression from bdf94916
...
The escape key event shouldn't be propagated after the first
tool dispatcher. Propagatint it causes it to go to parent frames,
which can mean problems arise (such as in cvpcb, where an
escape key press in the fpviewer frame was closing the main
cvpcb window when it is propagated).
2020-05-24 11:58:33 +01:00
Jeff Young
bdf9491682
Re-factor the event whitelist stuff so that it doesn't promise what it can't deliver.
2020-05-03 20:56:32 +01:00
Jeff Young
a3486b7cd4
Fix ESC handling with whitelist.
2020-05-03 20:56:32 +01:00
Jeff Young
73eda91ec7
Allow some events to run behind a modal dialog.
...
Right now this is just unit switching.
Fixes https://gitlab.com/kicad/code/kicad/issues/2344
2020-05-02 14:37:24 +01:00
Ian McInerney
60891f0b6d
Add more trace messages in the tool framework
2020-04-23 23:56:53 +01:00
Seth Hillbrand
1770a1ea21
Prevent invalid decrement in tool manager
...
Iterating over the tool stack, we potentially remove the current
iterator. If this removal happens at the beginning of the toolstack, we
cannot decrement the iterator to a position before the stack without
creating an invalid state.
2020-04-20 11:50:45 -07:00
Ian McInerney
e528769637
Move TOOLS_HOLDER into tools/ folder
...
Also clean up some compiler warnings
2020-04-19 01:51:49 +01:00
Jeff Young
919a66a703
Remove side-effect from finishTool().
...
It belongs out in the calling loop so that if someone else uses
finishTool() later they won't get bit by it.
This also fixes a crash bug where we weren't deactivating all tools
because we couldn't back up at the beginning of the stack (and the
loop increment therefore went past the first element).
Fixes https://gitlab.com/kicad/code/kicad/issues/4206
2020-04-16 21:58:45 +01:00
jean-pierre charras
bdada70ee7
Cosmetic enhancements: add bitmaps to a few context menus.
...
Fix also a minor compil warning.
2020-04-12 10:29:28 +02:00
Jeff Young
b13559c926
Add envVar and text variable resolution to plot directory paths.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/3808
2020-04-05 23:56:24 +01:00
Jeff Young
cc9ac37a0e
Add text variable support to envVar processing.
2020-04-05 20:52:26 +01:00
Ian McInerney
c29c3d9cc1
Diferentiate action types in the tool trace
2020-03-28 22:01:35 +00:00
Jeff Young
d69ebfae49
Push tool framework base down into TOOL_HOLDER.
...
This allows us to use it outside of EDA_BASE_FRAMEs (in this case, in
PANEL_PREVIEW_3D.)
2020-03-24 19:00:25 +00:00
Jeff Young
e9cd9ee8ff
Actionize the rest of the 3D viewer.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/2228
2020-03-19 15:10:32 +00:00
Tomasz Wlostowski
6673554866
common: prevent segfault with no edit frame in TOOL_MANAGER
2020-02-27 22:02:56 +01:00
Tomasz Wlostowski
33f9843fb7
ACTION_MANAGER: prevent null object call when used without a host frame
2020-02-27 22:02:56 +01:00
Jon Evans
e59a3d981e
Implement a new settings framework across all of KiCad
...
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.
2020-02-19 23:44:56 -05:00
Jeff Young
2017389f2d
Pinning for library trees in FPEditor and SymbolEditor.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/2288
2020-02-14 00:10:40 +00:00
Seth Hillbrand
03f74c87a1
Update immediate mode location and restart wires
...
The immediate action option clears (or not) the position of the events.
We use this to determine if the command should start at the given
position or merely activate the tool. This was being checked in the
menu options, which only activated for tool commands in the context
menu. Moving to the process event, we catch hotkeys as well.
This also restores the previous logic in eeschema that used a static
variable for storing wires rather than the private class variable.
Starting the draw event now picks up from the existing wires when
activated in immediate mode.
Fixes #3891 | https://gitlab.com/kicad/code/kicad/issues/3891
2020-02-11 09:12:36 -08:00
jean-pierre charras
46b72d807b
Kicad manager: Avoid crash when calling configure paths or libraries from main menu,
...
when _eeschema.kiface or _pcbnew.kiface is not found.
Happen mainly when running Kicad from build tree.
Now a suitable error message is displayed.
Fixes #3868
https://gitlab.com/kicad/code/kicad/issues/3868
2020-02-06 11:41:21 +01:00
Ian McInerney
b1240b5b1e
Gracefully shutdown tools when frames are closed
...
If the tools are not gracefully exited, then the stack variables are
never destroyed, so variable lifetime issues can occur.
Fixes https://gitlab.com/kicad/code/kicad/issues/1753
2020-02-05 22:23:24 +00:00
Alexander Shuklin
3d0b3a51f3
Eeschema: Adding back annotation
...
ADDED: Back annotation algorithm,
eeschema back annotation dialog
CHANGED: added some minor helper methods to SCH_REFERENCE_LIST and SCH_REFERENCE,
split SCH_REFERENCE_LIST::CheckAnnotation on 2 parts to reuse code
2020-01-29 16:33:57 +00:00
Jeff Young
91d1508c16
Fix some Coverity identified issues.
2020-01-13 20:16:40 +00:00
Ian McInerney
8fc434be19
Formatting change for dynamic cast tests
2020-01-13 01:48:57 +00:00
Ian McInerney
13b6028e1b
Refactor all math into a new kimath library
...
* 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 .
2020-01-07 17:12:59 +00:00
Ian McInerney
5d46e721e5
pcbnew: Cleanup includes of pcbnew_id.h
...
* Remove unused IDs from the enum
* Remove the include statements from files that no longer need it
2020-01-03 15:39:05 +00:00
Mark Roszko
11ff16be4e
Switch to scoped enums
2019-12-20 14:11:39 +00:00
Jeff Young
1f07505b27
Fix long-standing issue with arrow keys moving in both axes.
2019-12-15 14:29:47 +00:00
Seth Hillbrand
cbb88ce609
tool manager: Don't adjust the iterator to invalid
...
When finishing the first tool, we don't want to return an invalid
iterator
2019-11-03 10:15:21 -08:00
Ian McInerney
027658d3da
Fix invalid cursor position access in tool manager
...
Fixes: lp:1846923
* https://bugs.launchpad.net/kicad/+bug/1846923
2019-10-06 13:26:07 +02:00
Seth Hillbrand
4302bc2562
Fix segfault when getting mouse position
2019-10-04 08:58:32 -07:00
Jeff Young
d22ea0e201
Safety for frames which don't have an m_viewControls.
2019-10-03 22:23:35 +01:00
Ian McInerney
5862b1559f
Cleanup position handling for TOOL_EVENTs
...
* Make the events generated by the selection of context menu items
have the position where the menu was opened
* Ensure that TC_COMMAND type events have their position set to
be the cursor position where the event originated
2019-10-03 19:04:33 +01:00
Ian McInerney
d68dd09f63
Run all matching global actions for a hotkey
...
Fixes lp:1834547
https://bugs.launchpad.net/kicad/+bug/1834547
2019-09-18 09:21:43 -04:00
Jeff Young
10c25a2290
Update frame type enum to match current class names.
2019-09-06 23:38:20 +01:00
Jeff Young
3bd38ec245
Improve zoom-to-extents for footprints with long text.
...
Fixes: lp:1820540
* https://bugs.launchpad.net/kicad/+bug/1820540
2019-09-05 21:02:29 +01:00
Jeff Young
fc50ddda64
Implement Paste Special for eeschema.
...
Also changes the normal paste behaviour to only clear annotations
when a collision is found.
Fixes: lp:1837002
* https://bugs.launchpad.net/kicad/+bug/1837002
2019-09-02 19:24:29 +01:00
Jeff Young
79d062aefc
Don't allow selection dragging when a picker tool is running.
...
Fixes: lp:1841691
* https://bugs.launchpad.net/kicad/+bug/1841691
2019-08-30 10:33:34 +01:00
jean-pierre charras
37b166348a
Fix compil error and minor compil warnings
2019-08-27 09:13:07 +02:00
Seth Hillbrand
b3615b36bb
pcbnew: Retain 45° constraint
...
This also finishes the polygon with 45° lines when chosen as a create
option.
Fixes: lp:1833673
* https://bugs.launchpad.net/kicad/+bug/1833673
(cherry picked from commit fccce265aa
)
2019-08-26 14:36:23 -07:00
Jeff Young
d094934cf4
Put Place & Inspect menus in standard order.
2019-08-17 12:23:19 +01:00
Jeff Young
3cdf88f2c6
CERN copyrights for work packages.
2019-08-14 09:35:15 +01:00
Ian McInerney
8493daf9ff
Unify menu item creation for closing a window
...
* 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
2019-08-14 09:35:15 +01:00
Michael Kavanagh
79b2ff7551
Refactor deleteTool ACTION removing duplicates
2019-08-12 13:49:55 -04:00
Ian McInerney
b6f6fc3d65
Return handled status for actions run from hotkeys
2019-08-05 20:46:05 -06:00
Jeff Young
97d70d7844
Fix cursor bugs in simulation.
...
1) cancel simProbe or simTune when simulator window closed
2) handle non-stock cursors through SetCurrentCursor()
Fixes: lp:1833583
* https://bugs.launchpad.net/kicad/+bug/1833583
2019-08-04 16:25:36 -06:00
Jeff Young
cc82e59003
Push the Quit/Close menu logic down into common.
2019-08-02 14:32:49 -06:00
Ian McInerney
05429bc39c
Recursively call evaluate on submenus of conditional menus
...
There seems to be a bug with certain GTK setups that prevents the
submenus from getting sized correctly unless the elements are added
when the main menu is displayed.
Fixes: lp:1835460
* https://bugs.launchpad.net/kicad/+bug/1835460
2019-08-02 14:32:49 -06:00
Ian McInerney
bea74c27e5
Add log trace for tool handling
2019-07-31 21:56:53 -06:00
Jeff Young
460b03372d
Implement preference for immediate actions.
...
Also pushes prefer-selection-to-dragging to common.
2019-07-25 20:41:22 -06:00
jean-pierre charras
9e90cb9572
Kicad manager: fix incorrect handling of disabled state of tools in launcher toolbar
2019-07-24 18:04:04 +02:00
jean-pierre charras
b428d74281
Fix incorrect size of the displayed worksheet when starting eeschema or gerbview without file loaded.
...
It was due to not fully initialized VIEW parameters the first time COMMON_TOOLS::ZoomFitScreen() is called.
2019-07-20 11:53:53 +02:00
Jeff Young
e816a0c29d
Push Eeschema & PLEditor PICKER_TOOLs down into common.
...
Also implements a more robust push/pop tool strategy for pickers.
2019-07-16 00:44:01 +01:00
Jeff Young
58ca5b71a9
A more robust fix for 36f1d023f0
.
...
This one also handles when the events get out-of-order due to them
starting out in the Simulation window and not getting dispatched until
the mouse goes over the Schematic window.
Fixes: lp:1835907
* https://bugs.launchpad.net/kicad/+bug/1835907
Fixes: lp:1836544
* https://bugs.launchpad.net/kicad/+bug/1836544
2019-07-15 14:15:24 +01:00
Jeff Young
1dbaa89f95
Fix a bug in tool activation/deactivation and another illegal static_cast.
...
Fixes: lp:1836419
* https://bugs.launchpad.net/kicad/+bug/1836419
2019-07-14 10:39:38 +01:00
Jeff Young
7159f6e48a
MRU for page size and orientation, and clearer info that this is all preview data only.
...
Fixes: lp:1662239
* https://bugs.launchpad.net/kicad/+bug/1662239
2019-07-10 23:17:50 +01:00
Jeff Young
30ec895c96
Cleanup event processing stuff to keep better track of "handled".
...
See: https://lists.launchpad.net/kicad-developers/msg41471.html .
2019-07-09 21:59:46 +01:00
jean-pierre charras
1633068920
tool_dispatcher.cpp: fix incorrect handling of ESC key on Linux and Windows.
...
m_toolMgr->ProcessEvent() returns false when a ESC key is handled. It should return true.
So we force the handled flag to true for a ESC key event to avoid skipping this event.
Otherwise the ESC key event is handled twice.
2019-07-08 16:28:45 +02:00
jean-pierre charras
269cd11b5a
tool_dispatcher.cpp: fix incorrect char event filtering, that created issues on Windows.
...
At the beginning of tool dispatcher, the ProcessEvent did not return the fact a key event was captured or not.
Now this is the case, and the old char event filtering was no longer correctly working,
and some events were not fired, especially on Windows.
2019-07-08 13:51:10 +02:00
Jeff Young
4852c91b42
Possible fix for GTK bug differentiating hotkeys from menu picks.
...
Fixes: lp:1835672
* https://bugs.launchpad.net/kicad/+bug/1835672
2019-07-08 10:51:45 +01:00
Jeff Young
a11f3a0b80
Make <esc> unhighlight nets, but only after all tools have been cleared.
...
Also moves the Highlight Net hotkey from activating the tool to just doing
a one-shot highlight.
Fixes: lp:1835658
* https://bugs.launchpad.net/kicad/+bug/1835658
2019-07-08 00:02:25 +01:00
Jeff Young
b029e4e44a
Add a few more actions to the hotkeys list and add hotkeys to tooltips.
...
Fixes: lp:1792159
* https://bugs.launchpad.net/kicad/+bug/1792159
2019-07-07 22:30:18 +01:00
Jeff Young
a3b855ac6c
Massage an earlier fix so that mouse-clicks in tools update the highlighting.
2019-07-06 17:50:35 +01:00
jean-pierre charras
39c830435c
Fix a bug created by commit ea0edaba
.
2019-07-06 14:48:53 +02:00
Thomas Figueroa
ea0edaba21
Fix cursor lag in canvases on Windows.
...
Fixes: lp:1831541
* https://bugs.launchpad.net/kicad/+bug/1831541
2019-07-06 00:04:54 +01:00
Jeff Young
a9c66e15ea
Common-ize EE_ACTIONS::refreshPreview and use it after cursor actions.
...
Fixes: lp:1818667
* https://bugs.launchpad.net/kicad/+bug/1818667
2019-07-05 14:45:15 +01:00
Jeff Young
29df4f809e
Better safety around boost::optional.
...
I'm not sure these are necessary but I got a crash when checking one
as a boolean instead of calling is_initialized(). Sadly, my debugger
doesn't like boost, so I didn't get much more info.
2019-07-05 14:45:15 +01:00
Seth Hillbrand
69b31eb88d
Corrects test for return case in tool event
2019-07-02 10:32:49 -07:00