Commit Graph

940 Commits

Author SHA1 Message Date
Jeff Young 41619ebbe2 Decouple PROGRESS_REPORTER interface from implementations. 2021-08-14 21:05:49 +01:00
jean-pierre charras b1c67d9ad4 Cvpcb: fix possible crash when pressing the ESC key during some calculations, round 2.
It happened when firing a Close Event during calculations modifying widgets
inside the main frame.
The close event is now vetoed during these critical calculations.
2021-08-06 13:40:30 +02:00
jean-pierre charras 89f124595c Revert "Cvpcb: fix possible crash when pressing the ESC key during some calculations."
This reverts commit 99b242069d because it does
not fix all cases.
2021-08-06 13:33:14 +02:00
jean-pierre charras 99b242069d Cvpcb: fix possible crash when pressing the ESC key during some calculations.
It was due to calls to wxSafeYield() than can fire a Close Event during calculations
modifying widgets inside the main frame.
Fixes #8920
https://gitlab.com/kicad/code/kicad/issues/8920
2021-08-06 11:15:32 +02:00
Jeff Young 6aaf4413b3 Fix kicad_string.h / string.cpp mismatch.
They don't define a KiCad string class, so the header file name was
somewhat misleading. But the fact that they didn't match definitely
made coding more difficult.
2021-07-29 16:03:25 +01:00
Wayne Stambaugh 37b200cb3e Pass wxString objects by reference instead of on the stack. 2021-07-27 08:41:27 -04:00
Jeff Young 3c1af1af74 Update selected tool string when language changes.
Fixes https://gitlab.com/kicad/code/kicad/issues/8813
2021-07-23 20:16:53 +01:00
Wayne Stambaugh cb72da294a More NULL expunging. 2021-07-16 16:13:41 -04:00
Marek Roszko c794a6ce7a Add pdb install option for msvc 2021-07-14 23:42:45 -04:00
luz paz 0446d35f0d Fix source comment/doc typos (follow-up)
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`
2021-07-13 10:48:17 +00:00
Jeff Young 0c2ac9a711 Move GUI font code to common.
This also allows the Mac fixes for font facenames to be more
compartmentalized.

Fixes https://gitlab.com/kicad/code/kicad/issues/8657
2021-06-29 18:27:58 +01:00
Jeff Young 1db33c7b3a More safety (and better impl) for not sharing FP table/info stuff.
Fixes https://gitlab.com/kicad/code/kicad/issues/8657
2021-06-29 12:46:16 +01:00
Jeff Young a1dfc36233 More error message regularization. 2021-06-29 01:08:26 +01:00
Jeff Young 4aa8318dc2 More error message regularization. 2021-06-27 14:24:02 +01:00
Jeff Young 15a094c647 Give CVPCB its own footprint info list.
There's a smoking gun on Mac Big Sur that suggests that sharing the
table between binaries may be corrupting the heap.

Fixes https://gitlab.com/kicad/code/kicad/issues/8657
2021-06-25 17:48:15 +01:00
Jeff Young 3269f45776 Add wxDataView-style defensive code to wxListView usage.
Fixes https://gitlab.com/kicad/code/kicad/issues/8657
2021-06-22 22:25:06 +01:00
Jeff Young 1722bc03b0 Consistent terminology and punctuation. 2021-06-17 00:05:17 +01:00
luz paz 5f1e9bc8a7 Fix typos in source code 2021-06-10 01:24:15 +00:00
luz paz f968fc8719 Fix source comment / documentation typos 2021-06-09 19:32:58 +00:00
Wayne Stambaugh 6b5d512b9f More header clean up. 2021-06-08 15:39:47 -04:00
Jeff Young 3ff670d2a4 Disable ACTIONS::openPreferences for now.
wxWidgets needs to move the item to the KiCad menu on Mac, and it
can only find it if it has the id wxID_PREFERENCES.
2021-06-07 20:51:45 +01:00
Ian McInerney dc27079b71 cleanup tool event and tool action includes 2021-06-06 18:26:26 +01:00
Marek Roszko 4712d7a918 Remove a leaky wx/msgdlg.h include 2021-06-06 08:45:38 -04:00
Marek Roszko b1c9083743 Remove the wx/docview.h include 2021-06-03 18:42:08 -04:00
Marek Roszko 4df3cb912d Remove another leaky wx/log.h header 2021-06-03 08:11:15 -04:00
Marek Roszko 7faee5eda5 Stop salt the eart with wxhtml.h 2021-06-03 07:49:49 -04:00
jean-pierre charras 81c7fb61f8 Sub-menu "Preferences..." in main menu "Preferences": fix not working accelerator key.
Accelerator keys are disable in our WX_MENUBAR. A common ACTION_MENU is used and
"Preferences..." is now shown in Hotkeys list.
2021-05-29 18:09:49 +02: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 f6f2284851 Fix missing includes on Linux after commit 0427bda7 2021-05-01 20:05:01 +02: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
jean-pierre charras 8d0191151d Cvpcb: Fix a compil issue. 2021-04-09 08:34:33 +02:00
Ian McInerney 1db5e2bc96 Don't force an entire refresh of toolbars to update sizes
Forcing an entire refresh of the toolbars is wasteful,
so instead just update the sizers directly.
2021-04-02 19:12:21 +01:00
Jeff Young 94470bfa15 Minor cleanup. 2021-04-01 11:10:01 +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
Jeff Young 14e73d24dc Naming conventions. 2021-03-29 11:46:05 +01:00
Ian McInerney 475ac3697f Ensure toolbar controls have the correct width on frame creation
Otherwise they could be slightly too small and then look odd.
2021-03-28 13:07:56 +01:00
Ian McInerney 42c6af4bd8 Cleanup ACTION_MENU creation in some places
The ACTION_MENU constructor now takes the tool as an argument,
so the call to SetTool() immediately following it can be removed
and the tool just passed into the constructor.
2021-03-27 19:16:58 +00:00
Jon Evans 4dbeb15024 Use a worker thread to send socket commands
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6503
2021-03-23 03:20:40 +00:00
Jon Evans c04e19f9ac Include optimization: move some things from common.h to point-of-use 2021-03-20 12:09:18 -04:00
Jeff Young cad1cb0262 Improve naming. 2021-03-16 12:07:06 +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
Marek Roszko 3d4ac9af03 Relocate win32 resource files to the central folder for further consolidation 2021-03-09 21:48:14 -05:00
Dominik Wernberger e2aa7be4b3 Added a lot of consts and refactored a few lines 2021-03-08 12:49:48 -08:00
Jon Evans 720147d272 Remove transitive inclusion of bitmaps.h 2021-03-07 16:08:57 -05:00
Seth Hillbrand c15a9e60d4 Used cached footprints without check in preview
Between the time the user loads the footprint preview in cvpcb or Add
Footprint in pcbnew, we don't need to verify cache integrity to display
the footprint.  We use the cache copy when displaying until we close the
selection window and re-open.  This limits our need to iterate over the
full directory on every footprint display.

Alternate solutions for v7 should include looking into libfswatch for
change detection
2021-02-25 15:46:52 -08:00
Seth Hillbrand d3cf97847e Fix missing change for GetPath()
GetPath() returns the sheetpath for each component.  The component KIIDs
for all units are stored in m_kiids, reachable by GetKIIDs().  We no
longer assume a single unit for the component but store all units in the
single COMPONENT for matching reference

Fixes https://gitlab.com/kicad/code/kicad/issues/7658
2021-02-22 11:23:56 -08: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
Seth Hillbrand 8c2fe42ef0 More Undo/Redo Cleanup.
Don't need the reference point or container action type.  Clearing this
command signatures to prevent future confusion/use
2021-02-12 11:26:48 -08:00
Wayne Stambaugh 5ecef204cd Coding policy fixes.
Using "this->" violates coding policy section 2.7.
2021-02-09 11:35:43 -05:00
Michael Kavanagh 0551c98a99 Remove incorrect icon 2021-02-06 22:51:56 +00:00