The flag is to protect against the frame going out of scope with the
references intact. This shouldn't be in CloseProject because we close
the project without removing the frame. Instead, placing it in OnExit
gets set correctly when closing the whole project manager
Fixes https://gitlab.com/kicad/code/kicad/issues/10018
An old size for the window could cut off the PCM button if it were
migrated, so to ensure the button is visible, just always use a fresh
window size on migration.
Fixes https://gitlab.com/kicad/code/kicad/issues/9649
- do not use KICAD_MANAGER_CONTROL::Execute() to run PCM: it is not an external app.
- add a workaround to avoid keeping incorrect focus on buttons in PANEL_KICAD_LAUNCHER.
Fixes#9780https://gitlab.com/kicad/code/kicad/issues/9780
This prevents any potential breakage of a project due to the file changes.
It is overly zealous because the project manager doesn't actually have any
knowledge of which files belong to the project.
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/9654
Processing a menu event for quitting results in the frame being
destroyed. This crashes the program when it tries to access the newly
freed frame to check for autosave data. We bind the closing flag into
the base program which will be the last item freed on exit to ensure we
can correctly check for data loss
Fixes https://gitlab.com/kicad/code/kicad/issues/8638
1. Allow dots in package id for namespacing requirements
2. Add regex anchoring to force matching whole string
3. sha hex digest can only have [a-f0-9] chars
For some reason, escaped double quotes in wxString::Format cause issues
on Mac. We can replace them with single quotes in most places without
loss of clarity
In particular, don't use a fixed height for the templates chooser,
and Wrap() must be called again whenever the text is changed.
Also moves the buttons to icon buttons.
Fixes https://gitlab.com/kicad/code/kicad/issues/9241
This also moves closing the existing project earlier to improve the
workflow -- so there's a chance that the main fix might not be needed
anymore, but it's still safer to not have a control-flow that crashes
rather than to just not use that control-flow.
Fixes https://gitlab.com/kicad/code/kicad/issues/9200
Also removes the return value from the BITMAP_STORE's themeChanged
method as it will provide the wrong answer for the second frame it's
called on.
Also hooked up ACTION_TOOLBAR, the app launcher, and the project tree
to the wx event for system color changes so they change on the fly.
Fixes https://gitlab.com/kicad/code/kicad/issues/6026
Mac already uses diverse font sizes (for instance, smaller fonts for
radio button groups), and the anti-aliasing is a lot better. The
other platforms need a more limited range of sizes.
Fixes https://gitlab.com/kicad/code/kicad/issues/8608
It appears that both strategies in the last commit worked, leaving us
with squared scaling. The dialog pixel architecture seems safer than
our icon scaling stuff, so this version attempts to use only it.
Also works around a bug where wxELLIPSIZE_MIDDLE doesn't work on Mac.
Fixes https://gitlab.com/kicad/code/kicad/issues/8608
Fixes https://gitlab.com/kicad/code/kicad/issues/8375
used **only** in PCM (in Kicad manager), it is not found in some cases at run time.
So just use it in the main module to avoid a not found issue for the
wxbase315u_xml_gcc_custom shared object when launching Kicad
(the cost is very low)
curl.h has constraints on Windows (because it includes winsocks2.h) and must be
included before any wxxxx.h.
Because only very few files need curl.h, kicad_curl.h is included only in these files
Creates a script that will fomat the MacOS icons at 80% of the total
size in line with Apple's guidelines.
Script requires Inkscape 1.0 and png2icns (available on Linux boxen)
Fixes https://gitlab.com/kicad/code/kicad/issues/7977
Also fixes a bug where an empty window would get left when loading
a file from the KiCad manager window errored out.
Also fixes a bug where we were getting the wrong exception because
we were rethrowing the type-casted one (rather than just calling
throw).
Fixes https://gitlab.com/kicad/code/kicad/issues/8604
The goal of this work is to let developers run Python things
on macOS on their builds without generating a full
relocatable and redistributable build.
This is a WIP.
The project footprint folder gets renamed to the new project name. We
need to handle non-footprint files that may be stored there by updating
this path manually when copying extra files.
Fixes https://gitlab.com/kicad/code/kicad/issues/8503
While I haven't been able to reproduce the crash, my theory is that
those that do are running into situations where wxWidgets defers
destructing the window.
Fixes https://gitlab.com/kicad/code/kicad/issues/8458
The current sizing behavior leaves a lot of padding to the right side
of the window so don't set the minimum window size to the best size
calculated by the sizers. This will allow the user to resize as desired.
* Remove unused wxLogDebug calls.
* Add add application level character tracing to detect unhandled key
events.
* Catch unhandled exceptions in KiCad main event loop like single top
applications.
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
This is a work-in-progress. It could use testing while I continue to fix
the remaining pieces.
There are some changes that will be needed for signing and notarization.
This currently relies on a Python tool I wrote (dyldstyle) to fixup
KiCad.app correctly. I would like any bundle fixing necessary to use a
built KiCad on macOS to live inside KiCad, rather than in
kicad-mac-builder or elsewhere. While I was experimenting, I found this
worked, however, and I would love to get extra hands testing.
I added a CMake argument, MACOS_EXTRA_BUNDLE_FIX_DIRS, for devs and
packagers who have extra directories they need to add to
fixup_bundle on KiCad.app.
There's an issue about differing behavior when KiCad is opened via
the command line or via Finder/launchd.
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).
Saying "Import/Export" on the labels when the submenu has "Import"
or "Export" in it is redundant.
Note that we can't just update the action text with the new name,
because that is used in the hotkey list and would become too confusing
without the "Import"/"Export" text.
The first phase is for the environment before the OS
apps are created, and the second phase is for after
the OS app is created but before all of our processing.
Fixes https://gitlab.com/kicad/code/kicad/issues/7992
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.
I'm not sure we need a custom icon for this as we don't
have an editor action that happens when you double-click
one of these files. Someone's welcome to revisit this
later, though.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7314
- regression: directories visible in project tree were not populated.
- issue on Linux, with wxWidgets 3.1.4 trying to open a directory shown in
project tree (right clicking ) did not work.
Versions specific variables that may point to objects that change
through versions, allowing multiple KiCad versions to operate correctly
(even on MSW) on the same machine.
- Need to check that the path we are calling an "empty" directory doesn't exist before we start
- Need to check that the location where we are storing the resultant imported design isn't the same as the source location. If it is the same, do not make a copy of the files as it will fail.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6838
In theory, the WM should now choose the closest size icon for its
purpose, making it easier to distinguish in space-constrained settings
Fixes https://gitlab.com/kicad/code/kicad/issues/6798
1) schematic sheets which don't match a project name (ie: aren't a
root sheet)
2) legacy schematic sheets when a current-format sheet is also present
witht the same name
Fixes https://gitlab.com/kicad/code/kicad/issues/6801
The fileWatcher works on some platforms, but not on others.
Also modifies it so that it just asks for the directory name rather
than starting with the existing path (which provided unnecessary
flexibility at the expense of ease-of-understanding and ease-of-use).
If you want the directory somewhere else, select where you want it
before doing "New Directory...".
Also updates naming conventions and file order.
Fixes https://gitlab.com/kicad/code/kicad/issues/6592
SAMBA sends invalid change event IDs and wxWidgets crashes on rather than ignores the invalid IDs.
This punishes Windows Server users but its not easy to discern SAMBA from it.
Fix#5740
Don't use the same "post_*" icon in the treeview. The badge gives an
action that doesn't apply in the treeview.
Also renames different file blobs to the "file_*" prefix.
In some cases, the events may be driven in the same thread, which can
lead to a deadlock. Instead of waiting for the lock, simply refuse to
run if a loading system in in progress.
Fixes https://gitlab.com/kicad/code/kicad/issues/6606
(cherry picked from commit d7a6a2cc71)
So the new steals-focus protection stuff works well when there's a
focused control, but not as well when there's a modal dialog up which
happens not to have a focused control (or worse, a focusable control).
This adds a second mechanism for also checking to see if a modal dialog
is up (something that wxWidgets, true to form, makes very difficult).
Fixes https://gitlab.com/kicad/code/kicad/issues/6520
This keeps us from copying files that have just been copied when
a project is Saved As inside itself (which is a useful thing to do
when versioning backups or the like).
Fixes https://gitlab.com/kicad/code/kicad/issues/6388
The accelerator strings really shouldn't be part of the translation,
and some translations have cause the accelerator keys to be incorrectly
handled. It is simpler to make it separate and just join them to the
translated string.
Make all accelerator modifiers use lowercased Ctrl instead of CTRL
to be the same as the other modifiers.
Fixes https://gitlab.com/kicad/code/kicad/issues/5992