Commit Graph

356 Commits

Author SHA1 Message Date
david-beinder a5308e5f5c Fix python console toggle to work across pcbnew/eeschema 2021-07-03 22:48:46 +00:00
Jon Evans 8cbd754362 Preserve highlighted connection through a recalculation 2021-07-03 16:43:00 -04:00
Jeff Young 64f07ea9c6 Update text variables after changes.
Fixes https://gitlab.com/kicad/code/kicad/issues/8697
2021-06-29 13:55:06 +01:00
Jeff Young a1dfc36233 More error message regularization. 2021-06-29 01:08:26 +01:00
Jeff Young 685ee31c35 Workaround a few more OSX printf problems.
Also regularizes the frame title processing.

Also fixes a type where the library name wasn't processed for
variable expansion.

Fixes https://gitlab.com/kicad/code/kicad/issues/7742
2021-06-20 22:48:19 +01:00
Jeff Young 1722bc03b0 Consistent terminology and punctuation. 2021-06-17 00:05:17 +01:00
Seth Hillbrand 7953a5c62b Work around MacOS printf/format issues
MacOS wxWidgets implementation of wxPrintf/Format suffers from some
issues when mixing string types.  We avoid this by manually formatting
the string ourselves.

Fixes https://gitlab.com/kicad/code/kicad/issues/8404
2021-06-16 11:54:55 -07:00
Wayne Stambaugh ff099453c8 Rename class_library.[h|cpp] to symbol_library.[h|cpp]. 2021-06-15 09:24:55 -04:00
Wayne Stambaugh ee3eac325d Expunge the use of the word part from Eeschema code. 2021-06-15 08:32:11 -04:00
Wayne Stambaugh fb46cd8bc5 Expunge the use of the word component from Eeschema code.
The only exception to this is the SPICE simulator's use of component
when referring to physical component (R, L, C, etc.) values.
2021-06-14 14:00:21 -04:00
Wayne Stambaugh 71c183d7bb Rename LIB_PART to LIB_SYMBOL. 2021-06-14 07:11:17 -04:00
Wayne Stambaugh fbc135e69f Rename SCH_COMPONENT to SCH_SYMBOL. 2021-06-10 10:34:49 -04:00
luz paz f968fc8719 Fix source comment / documentation typos 2021-06-09 19:32:58 +00:00
Marek Roszko 4e94b1fe86 Remove the universal sockets include 2021-06-03 17:59:46 -04:00
Marek Roszko 1b94534451 Revert "Use lambdas to fix paste conditions"
This reverts commit 65c7c77c3d.
2021-05-30 21:25:42 -04:00
Marek Roszko 65c7c77c3d Use lambdas to fix paste conditions
`SELECTION_CONDITIONS::Idle && ` was evaluating as always true because this was referencing the function pointer
2021-05-30 20:37:16 -04:00
Seth Hillbrand f47784cd14 Fixup Junctions should call common tool 2021-05-28 12:35:38 -07:00
Roberto Fernandez Bautista 63f56640db CADSTAR Schematic: Add needed junctions on load
Fixes a bug that was causing junctions to disappear when they
were not perfectly positioned in the original CADSTAR design.
2021-05-28 20:13:10 +01:00
Seth Hillbrand 752ae4d519 Rename modification flag routines
Differentiates better between the EDA_ITEM IsModified(), referring to
items themselves changing and the EDA_SCREEN IsContentModified(),
referring to whether we have made any unsaved changes.
2021-05-28 12:07:04 -07:00
Seth Hillbrand d7f219e98f Unify IsSave and IsModify
The flags and calls were used identically, leading to potential
confusion/bugs.  Testing for modification should go through
IsContentModified()
2021-05-28 11:51:54 -07:00
jean-pierre charras cda9650380 Eeschema: ensure the actual canvas type is saved in config.
The saved type was not updated after switching the canvas type from Preferences.
2021-05-17 11:48:37 +02:00
Jeff Young c30102cd4f Don't crash when trying to save sim settings during shutdown.
Fixes https://gitlab.com/kicad/code/kicad/issues/8327
2021-05-01 21:49:40 +01:00
Marek Roszko 9dc611f704 Delay loading eeschema "project settings" to after the ui is ready 2021-05-01 16:13:48 -04:00
jean-pierre charras 0427bda768 Remove useless wx/wx.h include, that create sometimes compil warnings on msys.
wx/wx.h includes all wxWidgets .h files, and sometimes creates collision
names in #define between kicad and windows headers
Moreover, blindly including a lot of useless files is compil time consuming
2021-05-01 19:32:15 +02:00
Marek Roszko 6e9f833739 Disable two prof_counters if not ifdefed 2021-05-01 10:08:21 -04:00
Jonathan Haas 0593f3b0c3 Fill gc with background color before copying to clipboard
Fixes https://gitlab.com/kicad/code/kicad/issues/7995
2021-04-12 17:05:50 +00:00
Jeff Young df5f010514 Bug fixes for fields when editing a symbol from the schematic.
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
2021-04-09 17:14:53 +01:00
Ian McInerney 0a0935e0f3 Remove ACTIONS::TranslateLegacyId and TOOL_DISPATCHER::DispatchWxCommand
After commit 9535153f9e there were no more IDs inside the legacy ID
system. Therefore the entire system for dispatching and looking up
the legacy ideas and handling those events can now be removed and
the tool dispatcher simplified (it no longer needs to know about
the ACTIONS class).
2021-03-30 23:20:22 +00:00
jean-pierre charras faa5ed3e37 typo 2021-03-25 11:47:13 +01:00
Jeff Young 040cdd64f2 Fix typo in Eeschema titlebar.
Fixes https://gitlab.com/kicad/code/kicad/issues/8016
2021-03-25 10:28:03 +00:00
Jeff Young e560de496c Intersheet refs don't go in the view themselves.
(Their parents draw them.)

Also simplifies a couple of loops by using OfType().

Fixes https://gitlab.com/kicad/code/kicad/issues/7805
2021-03-19 16:14:34 +00:00
Jon Evans 18037e2f65 Rework bitmap system to load from archived PNGs
Bitmaps are now identified by an enum class instead of by pointers.
Bitmap loading and caching is now handled by a class in common, and
we no longer compile most bitmaps into the binary, so there is no
longer a bitmaps static library.

Instead, bitmaps are archived to a .tar.gz file which is installed
in ${KICAD_DATA}/resources/images.tar.gz

The source PNGs are checked in to Git as the original CPP files were,
so that people can build without the required dependencies to convert
SVGs to PNGs.

Initial support is also added for dark theme icons, although this
is not yet exposed in the GUI.

Stubs are present for multi-resolution image resources, but this is
not fully-baked yet and could use some refinement.
2021-03-11 08:37:35 -05:00
Jeff Young 8be3ff5a0a Perform a slightly more aggressive cleanup.
Also removes the functionality that selects the newly-added item as
we don't do that with any of the other drawing tools.

Fixes https://gitlab.com/kicad/code/kicad/issues/7833
2021-03-09 21:42:35 +00:00
Dominik Wernberger e2aa7be4b3 Added a lot of consts and refactored a few lines 2021-03-08 12:49:48 -08:00
Jeff Young 6fd247a152 Check for active tool as well as items.
Fixes https://gitlab.com/kicad/code/kicad/issues/7821
2021-03-08 14:09:43 +00:00
Jon Evans 720147d272 Remove transitive inclusion of bitmaps.h 2021-03-07 16:08:57 -05:00
Jeff Young a3b9e8ddb4 Round 2 of Worksheet -> Drawing Sheet. 2021-02-23 11:57:44 +00:00
Jeff Young cad5198ab7 Worksheet -> (industry standard) Drawing Sheet. 2021-02-22 17:35:46 +00:00
Jon Evans f1039dfb94 Disable project saving outside explicit save actions
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7589
2021-02-21 21:31:45 -05:00
Jeff Young 2d28ed8eda Move canvas backend selection to Preferences.
Fixes https://gitlab.com/kicad/code/kicad/issues/7630
2021-02-21 20:12:43 +00:00
Jeff Young 5994ce3711 Be more aggressive about updating title to show dirty status.
Fixes https://gitlab.com/kicad/code/kicad/issues/7613
2021-02-19 21:58:49 +00:00
Jeff Young 66b33834b5 Always enable save; move dirty bit to asterisk in title bar.
Also unifies PCB Editor and Schematic Editor names with other
locations in the GUI (which were still Pcbnew and Eeschema).

Fixes https://gitlab.com/kicad/code/kicad/issues/7587

Fixes https://gitlab.com/kicad/code/kicad/issues/7594
2021-02-18 16:05:42 +00:00
Jeff Young b2a4cbedda Add conditions for rotate/group/lock items in toolbar.
Also fixes cut/copy/delete conditions to allow use in immediate mode.
2021-02-18 00:10:41 +00:00
Jeff Young ec20121114 Make sure schematic symbol fields get transferred to symbol editor.
Fixes https://gitlab.com/kicad/code/kicad/issues/7501
2021-02-14 18:30:14 +00:00
Seth Hillbrand 505844f68c Generalize the Ctrl-Q to all frames
Rather than adding our handler to each frame separately, we initialize
the Ctrl-Q quit action at the base frame to be consistent
2021-02-09 11:43:42 -08:00
Seth Hillbrand 8567739a7a Remove conditions from common immediate-mode keys
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
2021-01-31 14:45:24 -08:00
Mikolaj Wielgus 8eca23aabe Mark null project initial screen as zoom-initialized
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
2021-01-31 00:49:11 +00:00
Jeff Young 41234a8373 Implement more precise annotation-required messages.
Also moves the message to an infobar so it's more noticeable.

Fixes https://gitlab.com/kicad/code/kicad/issues/7332
2021-01-30 16:31:27 +00:00
Roberto Fernandez Bautista 42cbcf7ef4 Don't allow empty page numbers
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6698
2021-01-22 14:02:34 +00:00
jean-pierre charras d052524707 Eeschema: fix zoom change on undo/redo command.
It was a side effect of commit e10025 fixing another zoom issue.
Fixes #7170
https://gitlab.com/kicad/code/kicad/issues/7170
2021-01-18 16:26:30 +01:00