Commit Graph

2403 Commits

Author SHA1 Message Date
freecad-gh-actions-translation-bot
f7483a08b4 Update translations from Crowdin 2025-12-08 22:31:48 -06:00
Frank David Martínez M
d7a7416398 [Core] FreeCADInit and FreeCADGuiInit refactoring (#23413) 2025-12-04 11:10:53 -06:00
Chris Hennes
dfb9baf678 Merge pull request #24262 from mnesarco/pyi-fixes-1 2025-11-29 20:23:37 -06:00
PaddleStroke
79f66b75f3 Datums: Prevent 'doesn't contain feature with role' error on load 2025-11-28 12:08:38 +01:00
github-actions
68cb0a3270 Update translations from Crowdin 2025-11-25 21:20:42 -06:00
Furgo
b571889ab5 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
bad2989b7b #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
e802aa1821 Removed sys in 'from os import sys, path' 2025-11-20 20:13:16 -06:00
David Carter
f4e78e3163 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
4d0c35dd2d 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
0083364dbe Doc: Improve the documentation of transactions (#21494) 2025-11-14 12:52:13 -06:00
github-actions
8432fab0a9 Update translations from Crowdin 2025-11-11 23:44:18 -06:00
Frank Martinez
3561d25c2d [License] Fix pyi license headers. 2025-11-11 13:26:18 -05:00
Frank Martinez
7fe379e5ea [bindings] remove redundant signatures. batch1 2025-11-11 13:23:10 -05:00
Frank Martinez
1cf57d6e11 [bindings] Format with yapf (precommit will reformat) 2025-11-11 13:23:10 -05:00
Frank Martinez
1b0c0399e9 [bindings] Fix overload order 2025-11-11 13:23:10 -05:00
Frank Martinez
a3232103d5 Fixed docstrings 2025-11-11 13:23:10 -05:00
Frank Martinez
39d15c011e black formatting 2025-11-11 13:23:10 -05:00
Frank Martinez
47e3162dcb [bindings] re-shape some keyword-only signatures 2025-11-11 13:23:09 -05:00
Frank Martinez
0eae00b9a1 [bindings] Code formatting 2025-11-11 13:23:09 -05:00
Frank Martinez
748004b4e4 [bindings] fix signatures in pyi files 2025-11-11 13:16:26 -05:00
Frank Martinez
8c7f381416 [bindings] Document 2025-11-11 13:08:06 -05:00
Frank Martinez
33f605a125 [bindings] ComplexGeoData 2025-11-11 13:08:05 -05:00
Frank Martinez
f1248c2418 [bindings] ApplicationDirectories 2025-11-11 13:08:05 -05:00
Florian Foinant-Willig
ee34d09f7a Core: add a check on object deletion 2025-11-09 16:44:40 -06:00
Max Wilfinger
aeb83b3c05 App: Apply code review suggestions 2025-11-02 17:38:06 +01:00
wwmayer
1844fdd443 PD: Toggling transparency doesn't reset colors 2025-11-01 09:05:03 +01:00
github-actions
11fecb1558 Update translations from Crowdin 2025-10-27 21:06:54 -05:00
Kevin Martin
0334c145d0 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
50d1dec4e0 Update translations from Crowdin 2025-10-20 09:57:05 -05:00
PaddleStroke
6e090a2dad 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
e187e696b5 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
9c1454385e 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
9ff4a40bc2 Fixing repr for App/Document and Gui/Document 2025-10-02 04:22:24 -04:00
Chris Hennes
60c8c51d49 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
05707c61fb Fix Refine in Cut Compound test 2025-09-26 16:12:56 -05:00
marioalexis
014edacf1b App: Fix GroupExtension finding wrong group for objects 2025-09-25 15:52:43 -05:00
Chris Hennes
39d39f34c3 Update translations 2025-09-25 2025-09-25 17:25:13 +02:00
PaddleStroke
001bab4439 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
9fdbbe44ee Merge pull request #23803 from 3x380V/py
Py3.13: fix warnings
2025-09-24 22:16:30 -05:00
Florian Foinant-Willig
d15d9948bc Core: set properties of frozen object read-only 2025-09-23 22:42:14 +02:00
drwho495
9f2d212b12 Toponaming: Don't add empty tags past the threshold 2025-09-22 10:35:13 -05:00
Chris Hennes
6a8cfed1d6 App: Fix the Python wrapper for isVersionedPath 2025-09-20 11:46:11 -05:00
sliptonic
636bd90d4d Merge pull request #23585 from chennes/extractVersionMigrator
Gui: Improve version migration UX
2025-09-20 10:01:40 -05:00
PaddleStroke
6e4d2a94d5 Core: GeoFeature::getPlacementFromProp prevent potential crash 2025-09-19 08:40:06 -05:00
Chris Hennes
929bd5090b 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
79640fd18a Merge pull request #23885 from chennes/pythonInterfaceToApplicationDirectories
App: Add Python interface to ApplicationDirectories
2025-09-17 18:11:41 -05:00
Chris Hennes
a6c5e9f08e App: Remove manual PCH entries 2025-09-17 16:18:10 -05:00
Chris Hennes
b64b0f528b App: Address reviewer comments 2025-09-17 16:08:07 -05:00
Chris Hennes
3dd12e5da1 Gui: Improve version migration UX 2025-09-17 10:43:16 -05:00