Commit Graph

45 Commits

Author SHA1 Message Date
Jon Evans 000fa28ffc Properties: initial infrastructure for symbol editor 2023-07-26 18:32:14 -04:00
Ian McInerney 2fb6f19a84 Separate immediate and delayed action dispatch
Using a boolean argument just leads to a lot of trailing booleans in the
function calls and is not user friendly. Instead, introduce PostAction()
to send an action that runs after the coroutine (equivalent to passing
false or the default argument), and leave RunAction as the immediate
execution function.
2023-06-27 00:57:59 +01:00
Jeff Young 5a9ed66cfd Go back to using QuasiModal for TextBox Properties.
Also removes auto-closing of blocking dialogs when inserting
symbols from the Symbol Editor or Chooser, preventing the bug
that QuasiModel was removed for earlier.

Also fixes a non-initialized parent pointer when the TextBox
Properties dialog was called from DrawShape().

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14777
2023-05-25 10:24:50 +01:00
Chris Morgan 80b55f5980 Symbol editor: simpler creation of a new derived symbol
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13407
2023-02-22 01:49:46 +00:00
jean-pierre charras e5363d164c Lib symbol editor, export SVG: fix incorrect position of the drawings.
Fixes #13249
https://gitlab.com/kicad/code/kicad/issues/13249
2022-12-23 16:31:35 +01:00
Marek Roszko 6eedbe4a14 Allow taking hidden fields into account for symbol unit bounding box
Even the GUI export of svg wasn't taking fields into account which rendered the fields regardless of status
2022-12-12 22:47:56 -05:00
jean-pierre charras 6130ce5d66 symbol_editor_control: fix incorrect bounding in SVG export.
Fixes #13093
https://gitlab.com/kicad/code/kicad/issues/13093
2022-12-07 13:13:35 +01:00
Jeff Young e335c1c612 Fix for LIB_TREE hotkeys over canvas and possible fix for over LIB_TREE itself.
Fixes https://gitlab.com/kicad/code/kicad/issues/11034
2022-10-02 22:22:21 +01:00
Jon Evans 2089374f53 ADDED: Export symbols from schematic to library
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11433
2022-09-23 21:23:01 -04:00
Jeff Young 8eb68ee472 Add pin/unpin context menu to Symbol Chooser and Footprint Chooser.
Also moves some more code down into common so it can be shared.

Fixes https://gitlab.com/kicad/code/kicad/issues/12384
2022-09-21 14:45:12 +01:00
Jon Evans da9be1a812 ADDED: Multi-selection cut/copy/paste in symbol editor library tree
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11505
2022-09-14 22:20:38 -04:00
lulu731 0180bcf90a ADDED: Implement Drag and Drop
dropping files to Kicad manager :
  *.kicad_pro, *.pro -> open project;
  gerber and job files -> open in Gerbview editor;
  Eagle and Cadstar files -> open project.
dropping file to schematic editor -> append schematic;
dropping library file to Symbol editor -> add library;
dropping board file to PCB editor -> append board;
dropping library or footprint file to Footprint editor -> add library or import footprint;
dropping ZIP file or gerber files to Gerbview editor -> open files;
dropping sheet file to Drawing Sheet editor -> open sheet.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/11638
2022-09-14 22:28:09 +00:00
Jeff Young b874aaac5e Add display options to Symbol Browser toolbar.
Particularly important on Mac where the menubar is disabled when the
frame is used in modal mode.

Also adds a display control to override the symbol's show pin numbers
setting.

Fixes https://gitlab.com/kicad/code/kicad/issues/7789
2022-09-08 00:28:30 +01:00
jean-pierre charras 993c446fdf Fix some warnings detected by PVS-STUDIO (most are not used vars) 2022-07-25 18:23:52 +02:00
Jeff Young def87c969e Redo the pinned-libraries storage architecture.
1) always use preferences directly
2) allow nicknames from either preferences or project
3) store-after-modify

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

Fixes https://gitlab.com/kicad/code/kicad/issues/11892
2022-07-22 09:31:10 +01:00
Seth Hillbrand 93fb00d815 Protect the Kiway dereference
Also find a few more places where we are reaching into a new frame to
perform actions that need to have dialogs closed.

Running actions should also wait for the next cycle rather than being
immediately executed when we are calling into a new frame.  This allow
for the cleanup actions onClose() to happen prior to the next action
starting

Fixes https://gitlab.com/kicad/code/kicad/issues/11891
2022-07-14 11:37:45 -07:00
Seth Hillbrand b5bf1da251 Keep track of blocking windows
Allows the calling KiWAY player to send messages to the blocking window
before signaling a separate call

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

Fixes https://gitlab.com/kicad/code/kicad/issues/11772
2022-07-13 19:25:24 -07:00
Seth Hillbrand 0dab566270 Fix name escaping in symbol editor
When renaming a symbol, be sure to handle name escaping in all of the
various places that we do renaming (!)

Fixes https://gitlab.com/kicad/code/kicad/issues/11939
2022-07-12 12:06:30 -07:00
Jeff Young c6f83b6dec ADDED Duplicate Footprint, Rename Symbol and Rename Footprint. 2022-04-22 22:06:51 +01:00
jean-pierre charras 5d9668938b SYMBOL_EDITOR_CONTROL::DuplicateSymbol(): fix incorrect validation test.
DuplicateSymbol() is called both to duplicate and paste. Only duplicate
needs a test to know if a symbol is selected.
Fixes #11053
https://gitlab.com/kicad/code/kicad/issues/11053
2022-04-01 10:42:20 +02:00
Seth Hillbrand 7ecc70a79d Duplicate from selected or current
When double-clicking to open a symbol, it is no longer selected in the
tree.  We need to use the `GetTargetLibId()` to pick the correct symbol
(first selected, then current) when using the duplicate command

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

(cherry picked from commit 802d20c409)
2022-03-03 16:04:22 -08:00
Marek Roszko 347e03363a Convert wxPoint/wxSize starting from EDA_RECT usages 2022-01-01 11:30:33 -05:00
Seth Hillbrand 6e5a918377 Writeable -> Writable 2021-11-08 15:56:51 -08:00
Wayne Stambaugh f233f4a0a9 Expunge EDA_FILE_SELECTOR.
EDA_FILE_SELECTOR was just an obfuscation of wxFileSelector().
2021-07-28 14:12:51 -04:00
Jeff Young a1dfc36233 More error message regularization. 2021-06-29 01:08:26 +01:00
Wayne Stambaugh ee3eac325d Expunge the use of the word part from Eeschema code. 2021-06-15 08:32:11 -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
Marek Roszko b5b76eedf7 Avoid sharing gdicmn for just bitmaps 2021-06-03 01:46:04 -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
Jeff Young f2e68e68d0 Add "Hide Tree" context menu options when tree has no selection.
Also cleans up some other code to be more consistent between symbol
editor and footprint editor.

Fixes https://gitlab.com/kicad/code/kicad/issues/8052
2021-03-29 12:02:00 +01:00
Jeff Young e206a9d39a Naming conventions. 2021-03-18 12:28:24 +00:00
Jeff Young 35d17929ff Add specific warning for no symbol library selected.
Fixes https://gitlab.com/kicad/code/kicad/issues/7954
2021-03-18 12:28:24 +00:00
Jeff Young 7415bf0c62 Don't hide (or disable) options if it's not obvious why.
It deprives us of the opportunity to inform the user what the conditions
are.
2021-03-15 02:23:29 +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 c2f68ca4da Whittle down library tree context menus to be more contextual.
(From discussion on Zulip.)
2021-02-19 19:07:45 +00:00
Jeff Young b43db7cd7d Fix assert in Symbol Editor.
Also allows some symbol lib operations when we know the context even
if the library itself isn't selected.  (For instance, select a symbol,
copy, paste.)
2021-02-18 18:08:37 +00:00
Wayne Stambaugh 356c2d3508 Symbol editor: fix symbol save as menu enable logic issue.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7451
2021-02-07 18:21:59 -05:00
Jeff Young c2dbd28101 Simplify and harmonize symbol editor and footprint editor menus.
Some differences are due to difference between libraries being files
in symbol editor and directories in footprint editor, but this unifies
most of the rest.

It also dispenses with the save-to-library vs save-to-document distinction
in the GUI because it makes for too much variability in the GUI, was
implemented differently between the two editors, and isn't needed as much
anymore now that we have the highly visible infobar.

There was also an issue that the save-to-board icon occupies the same
location and has the same size/shape/colours as the Board Setup icon in
PCBNew.

Fixes https://gitlab.com/kicad/code/kicad/issues/7215
2021-02-06 14:33:16 +00:00
Wayne Stambaugh 7737489e57 Symbol editor: don't allow new or imported symbols in read only libraries.
Fixes https://gitlab.com/kicad/code/kicad/issues/7334
2021-01-30 13:03:05 -05:00
Jeff Young 360953ba98 "comp" -> "symbol". 2021-01-19 23:50:40 +00:00
Michael Kavanagh 479487ceb1 Tidy up context menus a bit
Try and put the common actions in the same places
2021-01-17 22:42:03 +00:00
Wayne Stambaugh 5069d20768 Symbol editor: make library and symbol save as operations explicit.
Prior to this change the "Save As.." command would take a different action
based on the state of the editor which could be confusing.  There are now
separate commands for saving the currently selected library or symbol.

CHANGED: The implicit save as menu entry which would save the currently
selected library if no symbol was selected or the current symbol to a
different library.  There are now separate save as commands for libraries
and symbols to make it obvious what is being saved.
2020-12-27 11:55:32 -05:00
Jeff Young 8a720ef305 Update naming. 2020-12-25 23:37:01 +00:00
Jeff Young b6e267b78d Naming conventions. 2020-12-12 03:43:41 +00:00
Renamed from eeschema/tools/lib_control.cpp (Browse further)