The conditions prevent use in immediate mode for common actions. While
this makes enable/disable easier in menu items, this fix is a patch
until we refactor the action framework to distinguish between immediate
mode hotkeys that should start without selections and menu items that
need a selection before running.
Fixes https://gitlab.com/kicad/code/kicad/issues/5333
Tests for read-only in table save routines and catches other IO_ERRORS.
Still returns a non-specific error message but prevents crashing when
erroring during save.
Fixes https://gitlab.com/kicad/code/kicad/issues/7352
This also makes sure that the user gets a warning before saving over
an older s-expr format. While that won't always be wanted, it's now
in the infobar (like in PCBNew), so it's not too onerous.§
Fixes https://gitlab.com/kicad/code/kicad/issues/7347
Now looks at how hard it is to select the item (grids) and switches only
if the mouse is more than a grid square away and there is a new item
under the mouse.
Fixes https://gitlab.com/kicad/code/kicad/issues/4455
Due to a truncation when converting a value to integer, the first point was
sometimes missing because it looked like out of plot range.
Fix also a cosmetic issue in dialog.
Fixes#7345https://gitlab.com/kicad/code/kicad/issues/7345
The variable `m_Initialized` in `BASE_SCREEN` is used by
`SCH_EDIT_FRAME` to mark whether a screen had its zoom level initialized
by the "zoom to fit screen" action. When this variable is `false`, the
function `SCH_EDIT_FRAME::DisplayCurrentSheet()` performs "zoom to fit
screen", modifying the zoom level. This function is indirectly called in
the undo routines, so if `m_Initialized` is not set to `true`, a zoom
change will occur when the user undoes an operation, a behavior that is
undesired.
`m_Initialized` was not initialized to `true` for the null schematic
(the schematic that is loaded if no project is loaded), causing the
aforementioned undesired behavior.
To prevent this, I've changed the `SCH_EDIT_FRAME` constructor to set
`m_Initialized` to `true`, since it zooms to fit screen already. I've
moved `m_Initialized` from `BASE_SCREEN` to `SCH_SCREEN`, as it is used
only in Eeschema, and renamed it to `m_zoomInitialized`, a name I
believe that better describes what this variable does.
I've also introduced the function `SCH_EDIT_FRAME::initScreenZoom()` to
group the "zoom to fit screen" action with setting `m_Initialized` to
`true`, as they often should occur together.
I'd also like to say that I'm not confident whether
`SCH_EDIT_FRAME::DisplayCurrentSheet()` should perform the zoom level
initialization at this point, but I have decided to not change this
behavior for now, as the commit history suggests it's several years old.
Fixes https://gitlab.com/kicad/code/kicad/issues/7343
New strategy isolates all draw/don't draw decisions to the ViewGetLOD
routines, and all dimmed/not dimmed to PCB_RENDER_SETTINGS::GetColor.
The actual drawing in PCB_PAINTER is more-or-less conditon free.
Also adds new layers for pad and via hole walls so that they can be
controlled for high-contrast mode.
Also changes the drawing paradigm so that the pads are drawn even when
not on the high contrast layer, just in low contrast. The hole wall
is drawn in high contrast. This actually makes things clearer to the
user (although to be honest was done to keep from having to re-render
pads when the high contrast layer changes since we have two separate
layers now that we can adjut colours on).
Fixes https://gitlab.com/kicad/code/kicad/issues/7328
Without this commit, when `currentPlotWindow()` returned a valid
pointer, but one that is not used as a key in `m_plots`, it would get
inserted to the `m_plots` map. Because this pointer was not properly
initialized, a crash would later occur. I think this problem was
triggered by the pointer to welcome page, but I haven't checked.
Fixes https://gitlab.com/kicad/code/kicad/issues/7324
Forcing grid snap for the kick-start behavior loses snaps to pins that
may be desired. This also adds force-snapping in select mode to match
the user's auto-start preferences
Fixes https://gitlab.com/kicad/code/kicad/issues/7293
The BuildSteps folder now contains the CMake scripts that are
called during the build process as individual stages, while
the root CMakeModules directory contains the CMake files used
during the configuration phase.