Having the logic split between three different paths was
a bit much, this should hopefully be a bit easier to
maintain. All save logic now goes through SaveProject;
individual file writing is now a private function.
Also change Save As to Save Copy As in project manager
mode, as we don't want to change projects from inside
the editor in project manager mode.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9015
Add control of project creation to Eeschema; change defaults
to enable project creation in both programs. Properly set
project on newly-created schematics so "Save As" doesn't
get triggered repeatedly.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9000
Found via `codespell -q 3 -S *.po,./thirdparty -L aactual,acount,aline,alocation,alog,anormal,anumber,aother,apoints,aparent,aray,dout,einstance,modul,ot,overide,serie,te,,tesselate,tesselator,tht`
1) Don't reset value when name changes
2) Don't fire events when initialising dialog
3) Make sure when symbol is saved back to schematic that only current
instance has its ref updated, but that all instances have their other
fields updated.
4) When saving symbol back to board always use the fields from the
editor and not the (alias-specific) ones from the library.
Fixes https://gitlab.com/kicad/code/kicad/issues/8159
Adds ability to start new commit to eeschema, allowing all
AddItemsToUndoList to always append without foreknowledge. Keeps newly
split wires on the tool until placed
Fixes https://gitlab.com/kicad/code/kicad/issues/7512
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
1) init reference pages before trying to draw the SCH_FIELDs when
turning intersheet references on
2) don't double redraw because we accidentally cleared the last
hover item on a non-mouse-moved event.
3) make sure the root sheet gets a name for the hypertext menu.
1) Generalize SCH_ITEM owners (SCH_COMPONENT, SCH_SHEET, and now
SCH_GLOBALLABEL)
2) Generalize hypertext items
3) Use SCH_FIELD autoplace infrastructure for placing intersheet
references
4) Use textVar infrastructure for buildin intersheet references.
As an important side-effect this also fixes the undo issues with
intersheet refs.
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
This may affect other EDA_DRAW_FRAME objects as well but it doesn't seem
to be as noticeable in the symbol, footprint, and worksheet editors.
Fixes https://gitlab.com/kicad/code/kicad/issues/5248