Commit Graph

549 Commits

Author SHA1 Message Date
Jon Evans 35c7ba0a8a Fix hover/highlight of line edit points
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6104
2020-10-21 20:37:15 -04:00
Marek Roszko f1e2bdc2d0 Prevent zoom to fit from going to crazy zooms on blank canvas
Fix #6062
2020-10-19 18:51:32 -04:00
Marek Roszko f38676fc46 Move the timer fix to the dispatcher to just always run 2020-10-15 00:38:32 -04:00
Jon Evans 858718b949 CHANGED: High-contrast mode is now called single layer view mode
This makes it more obvious what the tool is for, and also clarifies
the difference between the 2-state and 3-state actions in the
hotkey dialog
2020-10-14 20:16:49 -04:00
Marek Roszko f59551d6ad Remove painter.h from eda_text.h 2020-10-14 19:18:38 -04:00
Marek Roszko 511bdb64e1 Fix the delete tool not immediately setting cursor
Fix #5939
2020-10-09 18:51:10 -04:00
Marek Roszko 8fa42a74bd Add zoom cursors 2020-10-08 20:52:58 -04:00
Mark Roszko d9485129c8 Implement more context specific cursors using both stock and custom cursors. 2020-10-08 00:50:28 +00:00
Jeff Young ee95d8fe2e Improve SNR in status bar (and use common code). 2020-10-06 12:08:31 +01:00
Ian McInerney 43c14face0 Switch to showing metric/imperial units in comboboxes and menus
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.
2020-10-05 20:26:33 +01:00
Ian McInerney 3a570c27f0 Update unit handling in the preview ruler
* Make the ruler able to switch to mils after creation
* Cleanup an unused flag in Pcbnew dimensions
* Move unit changed notification into EDA_DRAW_FRAME so more
  frames to use it.
* Allow switching units when GerbView ruler tool is active
2020-10-04 17:53:55 +01:00
Ian McInerney b1bd1f2a97 Introduce new action to switch to mils as a unit 2020-10-04 17:53:55 +01:00
Seth Hillbrand 8e515d0069 Standardize default hotkey refresh 2020-10-04 05:48:26 -07:00
Mikolaj Wielgus 400c15b8eb Add mils to units, remove useMils variables 2020-10-03 20:06:56 +00:00
Ian McInerney b69d396afc Turn the toolbar context menus into unique_ptr for easier management 2020-10-03 19:09:18 +01:00
Jon Evans 3b252c696d Make tool init order dependent on registration order
Previously, init order depended on the ordering of the
tool state map, which is opaque from the point of view of
registration.  This makes it challenging to make one tool's
init depend on another.  With this change, registration
order defines init order.
2020-10-02 18:42:41 -04:00
Seth Hillbrand 394b3b3a36 Use standard refresh icon in toolbar
Fixes https://gitlab.com/kicad/code/kicad/issues/5852
2020-10-02 12:01:33 -07:00
jean-pierre charras 8285110c2a more cleanup about removing useless include 2020-10-02 08:58:19 +02:00
Ian McInerney 8e7e1ffaaa Fix the mouse handling in the toolbar palettes
There were issues on OSX where the mouse being captured
by the parent toolbar would lead to seg faults, so release
the mouse on opening the palette.

Releasing the mouse then means that the mouse states become
confused, so we need to manually clear all the mouse states
when we open the popup.

Fixes https://gitlab.com/kicad/code/kicad/issues/5803
2020-09-28 00:42:47 +01:00
Ian McInerney 4ec46dabf8 Make the toolbar palettes open at a right angle to the toolbar
This opening is easier when using the drag-to-open system.
2020-09-27 23:20:17 +01:00
Ian McInerney 6dfe7b6eb0 Switch toolbar palettes to use AUI drag event
This isn't as much a hack as trying to detect it ourselves and
hope we don't clobber the internal toolbar workings.
2020-09-27 23:20:17 +01:00
Ian McInerney d5f781c7ca Allow dragging on the toolbar item to open a group 2020-09-27 02:22:22 +01:00
Ian McInerney df3018832b Fix toolbar palette location
This better aligns the first button in the palette with the
group button on the toolbar.
2020-09-27 01:58:41 +01:00
Ian McInerney fc565edb33 Add a palette to the toolbars to display groups of actions
This adds a palette to toolbar items that displays groups
of actions when long-pressed on a button.
2020-09-27 01:00:44 +01:00
Jeff Young f8875bc5a6 Move std::contains to alg::contains. 2020-09-26 14:42:40 +01:00
Jeff Young d7e80f8008 Add std::contains() to simplify a lot of code. 2020-09-26 12:40:32 +01:00
PJM d1322e7d1d Refactor GetDocumentExtents()
CHANGED: GetDocumentExtents() in 'eda_draw_frame.h' now has a bool
parameter "aIncludeAllVisible" with a default value "true" which makes
it behave as it did before adding parameter.  If "aIncludeAllVisible"
is false, the returned bbox ignores some items depending on which
program it is running in.

CHANGED: Made "Zoom to Objects" use only PCB edge in Pcbnew.  This
allows text, notes, etc outside the PCB edge to be excluded in the
zoom calculation.

CHANGED: Added "Zoom to Objects" to Pcbnew main menu, and to RMB context
menus for Eeschema and Pcbnew.

Fixes https://gitlab.com/kicad/code/kicad/issues/5787
2020-09-25 00:31:56 -07:00
Jon Evans 690575e2b6 Improve edit point legibility with a hover state 2020-09-23 21:27:23 -04:00
jean-pierre charras e64806cd20 Menus/Submenus: fix incorrect bitmap for checkable menuitems in submenus.
Windows specific, because other OS do not accept user bitmaps in ckeckable menuitems
the bug was due to the same bitmap was set for each state for these menuitems.

Fixes #5622
https://gitlab.com/kicad/code/kicad/issues/5622
2020-09-20 16:30:23 +02:00
Ian McInerney 89dcc46898 Coverity cleanup and remove unused variables 2020-09-20 02:20:41 +01:00
Jeff Young 1a988e8d85 Fix event processing bug which kept ModEdit's context menu from working. 2020-09-18 11:49:34 +01:00
Jeff Young 8dd725469f Process properties command locally within drawing tools.
Fixes https://gitlab.com/kicad/code/kicad/issues/5612

Fixes https://gitlab.com/kicad/code/kicad/issues/5615
2020-09-17 22:32:22 +01:00
PJM abdd1906c2 Change 'Zoom to Fit' margins and add 'Zoom to Objects'
CHANGED: The margin used in 'Zoom to Fit' is now 2% instead of 10%.

ADDED: Added 'Zoom to Objects' to Eeschema which does not include
the page and border in the bbox calculations.

CHANGED: Removed pre-existing code that tweaked the center to account
for the scrollbars.  It actually made the view off center.  Removing it
results in perfectly centered zooms.

Fixes https://gitlab.com/kicad/code/kicad/issues/5145
2020-09-16 00:53:39 +00:00
Seth Hillbrand 4026904cc4 Make grid snapping depend on grid visibility
Turning the grid view on enables snapping to the grid.  Turning it off
removes the snap and allows free draw
2020-09-09 10:18:15 -07:00
Ian McInerney f28b60896c Allow toolbar items to cancel tools when pressed
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
2020-09-05 01:49:38 +01:00
Jeff Young 08dee31d9e Try and unify the background colors between panels and platforms.
Also moves to WX_GRID to get rid of some wxGrid bugs, and moves the
provision of attrs to the GRID_TABLE (as those applied to the grid
are ignored when a table is specified).

Fixes https://gitlab.com/kicad/code/kicad/issues/5260
2020-09-04 20:47:50 +01:00
Jeff Young 8d57136ad6 Fix bone-headed previous check-in. 2020-08-31 20:45:22 +01:00
Jeff Young 1f9aa2d198 Remove hotkeys for canvases.
Fixes https://gitlab.com/kicad/code/kicad/issues/4788
2020-08-31 20:34:24 +01:00
Jeff Young 2697fc3864 Remove canvas-switching from OSX.
The Cairo renderer doesn't work on Retina displays.

Fixes https://gitlab.com/kicad/code/kicad/issues/4788
2020-08-31 18:48:25 +01:00
Fabien Corona 4a0d6297ab pcbnew: Add an alternate edit method for arcs
The alternate edit methods keeps the radius constant

Fixes https://gitlab.com/kicad/code/kicad/-/issues/5369
2020-08-29 22:59:11 +00:00
Seth Hillbrand 1e461c2259 ADDED: Improved center point dragging
The center point on polygons now maintains the axis of the dragged line
and, optionally with Ctrl pressed, maintains the slope of the adjacent
segments as well.

This also fixes a longstanding issue that prevented the ctrl-snapping
from using the original point rather than the last updated point when
constraining.

Fixes https://gitlab.com/kicad/code/kicad/issues/2465
2020-08-27 10:34:12 -07:00
Jeff Young 1138c32bf3 Don't pass Cancel event where there was a specific action cancelled.
For instance, if during a move the user hits ESC they only want the
move cancelled, not (for instance) the selection dropped.

Fixes https://gitlab.com/kicad/code/kicad/issues/5356
2020-08-25 12:54:40 +01:00
Jeff Young b8bbe72e48 Another attempt to fix the select-reference-point toolstack thing.
This time remove the push/pop from the picker tools as that's
responsible for the issue of trying to re-activate the move action
when its popped.  Instead do the push/pop from the client code
of other actions that need it, and not at all from the move-with-
reference action.

Fixes https://gitlab.com/kicad/code/kicad/issues/5336
2020-08-24 22:47:24 +01:00
Jeff Young a4ff339a1e Clear toolstack after cancel.
Fixes https://gitlab.com/kicad/code/kicad/issues/5336
2020-08-24 19:28:53 +01:00
Seth Hillbrand ffdf4deb59 Fix copy-pasta 2020-08-20 20:18:39 -07:00
Seth Hillbrand 7565a08396 eeschema: Add select all to schematic and library editor
Fixes https://gitlab.com/kicad/code/kicad/issues/2497
2020-08-20 16:07:10 -07:00
Seth Hillbrand 1e315bc3fe pcbnew: Add "Select All" Action to pcbnew and fpedit
Fixes https://gitlab.com/kicad/code/kicad/issues/2497
2020-08-20 16:07:10 -07:00
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