Wayne Stambaugh
ede39780e2
Remove all debugging output that cannot be disabled.
...
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.
2020-08-18 10:17:36 -04:00
Marek Roszko
a417da4ce0
Split selecteditemmodified to a selecteditemmoved to reduce updatemsgpanel spam
2020-08-18 13:11:47 +00:00
Ian McInerney
5955091eb3
Turn CONDITIONAL_MENU's conditions into only show/hide conditions
...
This leaves the decision to check/enable menu items to the main UI
conditions, and only the menu has control over showing/hiding the menu
items. Also rip out a special case for the preferenes item that isn't
needed on OSX anymore since all the main menus have been moved to
ACTION_MENUs now.
2020-08-17 23:40:02 +01:00
Ian McInerney
dbe5537fa9
Don't run the hotkey if the action isn't enabled
...
CHANGED: Don't run the hotkey if the action's UI elements aren't enabled
This makes it so the action can't be run from either the hotkey or the
UI if its enabling conditions are not met.
2020-08-16 19:10:26 +00:00
Ian McInerney
4491f24d5e
Ripout the old SyncToolbars infrastructure reminants
...
The tool framework no longer needs to request updates of the UI
state for the controls, wxWidgets will do it for us.
2020-08-16 19:10:26 +00:00
Ian McInerney
e8b11c911e
Migrate Pcbnew/footprint viewer/footprint editor to the new UI update system
2020-08-16 19:10:26 +00:00
Ian McInerney
fd4388710d
Migrate eeschema, libview and libedit to the UI condition framework
...
Also, fix some issues in other frames identified along the way.
2020-08-16 19:10:25 +00:00
Ian McInerney
3b05d7cddd
Move more frames to the new UI condition framework
...
* 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.
2020-08-16 19:10:25 +00:00
Ian McInerney
72a1c71e07
Implement a framework to handle wxUpdateUIEvents for tool actions
...
This allows for the tool framework to keep track of a universal
set of conditions for the UI state (enabled/checked/shown) for
controls of actions. It removes the need for the main menubar
menus to be CONDITIONAL_MENUs and be rebuilt on each open,
and instead makes the updates of the check and enabling of
items handled in the native wxWidgets way.
This commit switchs the 3d viewer and kicad project manager window
over to this system.
2020-08-16 19:10:25 +00:00
Ian McInerney
d19ff3e595
Unify the UI IDs for actions between the menus and toolbars
...
By unifying the IDs so that an action only has one UI ID,
it will receive only one update event that will work for
all controls using the action.
2020-08-16 19:10:24 +00:00
jean-pierre charras
98b1f55e29
Eeschema: minor fixes: fix incorrect label in DIALOG_LIB_EDIT_PIN, electrical pin list.
...
Gives also to functions GetText() and GetBitmap() a more significant name.
Fixes #5007
https://gitlab.com/kicad/code/kicad/issues/5007
2020-07-29 17:04:52 +02:00
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