Commit Graph

2403 Commits

Author SHA1 Message Date
freecad-gh-actions-translation-bot
97b9193d71 Update translations from Crowdin 2025-12-08 22:31:48 -06:00
Frank David Martínez M
da43de8ae0 [Core] FreeCADInit and FreeCADGuiInit refactoring (#23413) 2025-12-04 11:10:53 -06:00
Chris Hennes
9cd4a2ec7d Merge pull request #24262 from mnesarco/pyi-fixes-1 2025-11-29 20:23:37 -06:00
PaddleStroke
17611ad02e Datums: Prevent 'doesn't contain feature with role' error on load 2025-11-28 12:08:38 +01:00
github-actions
914b34cc1a Update translations from Crowdin 2025-11-25 21:20:42 -06:00
Furgo
b72f635bb2 App: Handle uncleared Python exceptions during object restoration
When a Python-based object throws an exception during the restoration
process (e.g. inside `onDocumentRestored`), the error is caught by a
generic `catch(...)` block in `Document::afterRestore`.

Previously, this block swallowed the C++ exception wrapper but failed to
clear the underlying Python error state. Leaving the interpreter in this
"dirty" state caused a segmentation fault or `SystemError` later in the
loading process when C++ attempted to interact with the Python API
(specifically in `App::Application::setActiveDocument`).

This commit adds a check for `PyErr_Occurred()` inside the catch block.
If an error is detected, the traceback is printed to the console for
debugging, and `PyErr_Clear()` is called to reset the interpreter state,
allowing the application to continue loading the document without
crashing.
2025-11-24 17:26:46 +01:00
Andrew Burks
b32c224f09 #25474 Added read-only warnings when saving documents (#25532)
* #25474 Added read-only warnings when saving documents

Block saving a file and notify user if windows is unable to save to the file for any reason, or the read-only attribute is checked. Also check std::filesystem::perms for write permission and other checks in FileInfo::isWritable(), although it doesn't seem to matter on windows.

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2025-11-23 05:09:32 +00:00
Logstor
3d24580646 Removed sys in 'from os import sys, path' 2025-11-20 20:13:16 -06:00
David Carter
31929cb4e5 Materials: Assigning material without appearance
Assigning a material without an appearance reset the appearance to the
default appearance.

There were two main problems. One was the comparison function for
App::Material objects. It would return false when the UUID or MatType
values were different although there are many circumstances where this
could be true and the appearance be the same. It also incorrectly
compared the imagePath.

The second problem was the logic for detecting if an object has already
been assigned an appearance by assigning a material or manually setting
the appearance. If assigned a material, the appearance should update but
not if it has been set manually. This logic has been corrected.
2025-11-17 17:43:14 +01:00
Chris Hennes
71104a08e7 Core: Convert transparency to alpha (#24891)
* Core: Convert transparency to alpha

Create new `Base::getVersion()` function for extracting a program
version enumeration given a version string.

Convert transparency to alpha value for old project files.

* Base/App: Address review comments

---------

Co-authored-by: wmayer <wmayer@freecad.org>
2025-11-17 17:15:19 +01:00
Pieter Hijma
7e3b2230b9 Doc: Improve the documentation of transactions (#21494) 2025-11-14 12:52:13 -06:00
github-actions
bb748b15ea Update translations from Crowdin 2025-11-11 23:44:18 -06:00
Frank Martinez
5e343b0b99 [License] Fix pyi license headers. 2025-11-11 13:26:18 -05:00
Frank Martinez
fc99a20a03 [bindings] remove redundant signatures. batch1 2025-11-11 13:23:10 -05:00
Frank Martinez
0d0689341b [bindings] Format with yapf (precommit will reformat) 2025-11-11 13:23:10 -05:00
Frank Martinez
d4d7cabdc5 [bindings] Fix overload order 2025-11-11 13:23:10 -05:00
Frank Martinez
0509df6b31 Fixed docstrings 2025-11-11 13:23:10 -05:00
Frank Martinez
591e8a36b3 black formatting 2025-11-11 13:23:10 -05:00
Frank Martinez
8e51db4072 [bindings] re-shape some keyword-only signatures 2025-11-11 13:23:09 -05:00
Frank Martinez
c9579bbff2 [bindings] Code formatting 2025-11-11 13:23:09 -05:00
Frank Martinez
802f62739e [bindings] fix signatures in pyi files 2025-11-11 13:16:26 -05:00
Frank Martinez
b59a80b540 [bindings] Document 2025-11-11 13:08:06 -05:00
Frank Martinez
3c782de402 [bindings] ComplexGeoData 2025-11-11 13:08:05 -05:00
Frank Martinez
2fb6f7e15a [bindings] ApplicationDirectories 2025-11-11 13:08:05 -05:00
Florian Foinant-Willig
cc6e054c79 Core: add a check on object deletion 2025-11-09 16:44:40 -06:00
Max Wilfinger
e1c4293706 App: Apply code review suggestions 2025-11-02 17:38:06 +01:00
wwmayer
d5ccc4a8d1 PD: Toggling transparency doesn't reset colors 2025-11-01 09:05:03 +01:00
github-actions
a3c2454a61 Update translations from Crowdin 2025-10-27 21:06:54 -05:00
Kevin Martin
c97d1ffed8 Do not use the object's Name as a Label if that Label already exists 2025-10-20 17:07:42 +02:00
github-actions
5ae4bbf837 Update translations from Crowdin 2025-10-20 09:57:05 -05:00
PaddleStroke
a0c28aba75 Assembly: Fix lengths cannot be negative (#24625)
* Assembly: Fix lengths cannot be negative

* Update PropertyUnits.cpp

* Update PropertyUnits.h

* Update JointObject.py
2025-10-14 11:40:10 +02:00
IFo Hancroft
d6acbf5825 Added GPL-3.0-or-later to the list of licenses (#24447)
* Added GPL-3.0-or-later to the list of licenses

* Incremented number of licenses
2025-10-06 11:33:07 -05:00
PaddleStroke
fe534bcf99 Assembly: Isolate joint components during selection and edit. (#23680)
* Core: Add signalBeforeOpenTransaction

* Assembly: Isolate

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update src/App/AutoTransaction.cpp

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2025-10-02 21:07:06 -05:00
Steven James
84c50f5794 Fixing repr for App/Document and Gui/Document 2025-10-02 04:22:24 -04:00
Chris Hennes
1f986061aa Merge pull request #24178 from FlachyJoe/non-recursive-freeze
Core: Freeze state enhancement
2025-09-30 13:01:15 -05:00
Frank David Martínez M
77b034dc82 Fix Refine in Cut Compound test 2025-09-26 16:12:56 -05:00
marioalexis
c8fb2d1ae0 App: Fix GroupExtension finding wrong group for objects 2025-09-25 15:52:43 -05:00
Chris Hennes
1c6d9c79fb Update translations 2025-09-25 2025-09-25 17:25:13 +02:00
PaddleStroke
725abff6a7 Core: Add signalAboutToOpenTransaction (#24049)
* Core: Add signalAboutToOpenTransaction

* change name to squash

* Update AutoTransaction.cpp

* Update Application.h

* reorder

* Update AutoTransaction.cpp

* Update Application.h
2025-09-24 22:45:57 -05:00
Chris Hennes
8c66c91ef4 Merge pull request #23803 from 3x380V/py
Py3.13: fix warnings
2025-09-24 22:16:30 -05:00
Florian Foinant-Willig
7531334637 Core: set properties of frozen object read-only 2025-09-23 22:42:14 +02:00
drwho495
08cbc5cffa Toponaming: Don't add empty tags past the threshold 2025-09-22 10:35:13 -05:00
Chris Hennes
b262f4b17c App: Fix the Python wrapper for isVersionedPath 2025-09-20 11:46:11 -05:00
sliptonic
975a4b65d2 Merge pull request #23585 from chennes/extractVersionMigrator
Gui: Improve version migration UX
2025-09-20 10:01:40 -05:00
PaddleStroke
a24747bcb8 Core: GeoFeature::getPlacementFromProp prevent potential crash 2025-09-19 08:40:06 -05:00
Chris Hennes
cc48a08f46 App: Sanitize all paths for null characters (#23821)
* App: Sanitize all paths for null characters

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Apply suggestions from code review

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Kacper Donat <kadet1090@gmail.com>
2025-09-18 17:37:33 +00:00
sliptonic
524526ac5a Merge pull request #23885 from chennes/pythonInterfaceToApplicationDirectories
App: Add Python interface to ApplicationDirectories
2025-09-17 18:11:41 -05:00
Chris Hennes
4aa01bb948 App: Remove manual PCH entries 2025-09-17 16:18:10 -05:00
Chris Hennes
5f30da529a App: Address reviewer comments 2025-09-17 16:08:07 -05:00
Chris Hennes
d9e6ee8fa1 Gui: Improve version migration UX 2025-09-17 10:43:16 -05:00