Commit Graph

33297 Commits

Author SHA1 Message Date
Abdullah Tahiri
2a3fe4c628 Gui: Notifications Framework - accept more notifier types
=========================================================

Extends notifier types to Gui::Document, App::Document, Gui::ViewProviderDocumentObject.

This allows to pass these objects as notifiers, and the framework gets the right string
from the Label or FullLabel as appropriate.
2023-05-24 18:35:41 +02:00
wandererfan
367a0a7277 [TD]prevent object deletion outside dialog 2023-05-24 10:15:45 -04:00
wandererfan
2737e830b1 [TD]fix fail on object deleted during dialog (#9626) 2023-05-24 10:15:45 -04:00
Jonas Bähr
7356c8d844 Add myself to CONTRIBUTORS 2023-05-23 17:13:56 -04:00
wmayer
12c20003b3 Sketcher: fix crash when creating a parabola or hyperbola or when using Sketcher_Split
Forum: https://forum.freecad.org/viewtopic.php?t=78543
2023-05-23 20:01:41 +02:00
wmayer
812a20b864 MeshPart: Allow to cancel trim by plane 2023-05-23 16:05:49 +02:00
Abdullah Tahiri
d7ec60c2b4 Console: Improve the documentation 2023-05-23 14:24:45 +02:00
Abdullah Tahiri
12a7f3b236 NotificationArea/Preferences: Allow Opt-in for Developer warnings and errors
============================================================================

The old preferences had errors and warnings ON by default and allowed to opt-out.
It was not possible to separate errors/warnings intended for users from those intended for developers.

The new version has developer errors and warnings OFF by default. User intended ones are ON.
It is possible to opt-in for developer errors and warnings from the preferences dialog.

As developer errors and warnings are NOT translated, if opting-in, they won't be localised.

User errors and warnings should be translated. If they are not, it is a bug.
2023-05-23 14:24:45 +02:00
Abdullah Tahiri
0e85b24348 Sketcher: Command constraints error handling adaptation
=======================================================

- Better handling for exceptions originating in Python addConstraint.
- Refactor to reuse code for handling of exceptions
2023-05-23 14:24:45 +02:00
Abdullah Tahiri
2338ae633e Sketcher: Make Command Constraints show the severity of warning for typical user mistakes 2023-05-23 14:24:45 +02:00
Abdullah Tahiri
c2b2b0c1fa Base: Interpreter - Mark Exception reporting and stack as intended for developers 2023-05-23 14:24:45 +02:00
Abdullah Tahiri
cc13da5470 Console: Remove Translated Notification message
===============================================

With the new console extension, the translation state is coded separatedly.

Therefore, it is possible to code a Notification as translated without needing a specific type.

Additionally, any other message, such as Error of Warning can be translated.

It does not make sense to leave this message, if only for reasons of coherence and to simplify
maintainance of code.
2023-05-23 14:24:45 +02:00
Abdullah Tahiri
c973033b6c Gui: Adapt Notifications Framework 2023-05-23 14:24:45 +02:00
Abdullah Tahiri
98f3163a7a App: NotificationArea adaptation to the new messages 2023-05-23 14:24:45 +02:00
Abdullah Tahiri
2bcee570da Console: Extend the Python interface 2023-05-23 14:24:45 +02:00
Abdullah Tahiri
45bf89d977 Console: Convenience dedicated functions 2023-05-23 14:24:45 +02:00
Abdullah Tahiri
a66e00d2a4 Ilogger - Separate behaviour for user exposed and not exposed loggers 2023-05-23 14:24:45 +02:00
Abdullah Tahiri
e3702ac2d8 Console: Extend framework with intended recipient and content type metainformation
==================================================================================

Limitations of the current framework:
- Codes the translated state only for TranslatedNotification as part of the type.
- Does not code the intended recipient (user, developer, ...)

Problems:
- Some errors are intended for developers, some errors may only be intended for users,
if, for example, there is another developer error which already contains all the information.
The current framework may lead to information duplication or to showing to the user developer
information, which is perceived as annoying.
- Logs shall be in English (report view), while every message to the user (UI) shall be translated.
The current framework can only differentiate where to report based on subscription (legacy logs do not
subscribe to notifications), and for notifications, whether it is translated or not depends on the type.
It is not possible to code errors or warnings that are already translated.

Solution:
- To extend the ILogger interface with additional metainformation, indicating the intended recipient
(User, Developer, All), and the content of the message (translated, untranslated, untranslatable). The latter
is useful for dynamic strings that won't find a match in the translation framework.

Bonus:
- This extended version allows to do away with translatednotification, as now any message can be independently
marked as translated or untranslated or untraslatable.
- It is now possible to provide the right icon of severity (error, warning, info), even when it is only user intended
and already translated.
2023-05-23 14:24:45 +02:00
Jonas Bähr
dc07897a29 Sketcher: Add tests for Circle to Line distance constraint
Note that support for secants currently only works for reference
constraints but not for driving ones. If and how this should be done
is still under discussion [1].

[1]: https://github.com/FreeCAD/FreeCAD/pull/9044#issuecomment-1548006842
2023-05-23 14:19:51 +02:00
Yorik van Havre
03450a5684 Merge pull request #9586 from yorikvanhavre/arch-ifc-export-fix
Arch: Minor fix to IFC exporter
2023-05-23 13:53:14 +02:00
Yorik van Havre
1ae23db392 Merge pull request #9585 from yorikvanhavre/arch-svg-fill
Arch: Fixed SVG fill
2023-05-23 13:52:33 +02:00
Chris Hennes
aa3b2f39a6 Merge pull request #9624 from wwmayer/fix_OpenSCAD_cmds
OpenSCAD: Hull/Minkowski also work for a single selected object
2023-05-22 13:45:31 -05:00
Chris Hennes
7a9b25bc6f Merge pull request #9381 from wwmayer/tweak_clang_format
Set BreakConstructorInitializers to BeforeComma
2023-05-22 09:01:12 -05:00
Chris Hennes
d45356e2b5 Merge pull request #9627 from chennes/addonManagerMiscBugs
Addon Manager: Minor error handling cleanup
2023-05-21 20:37:54 -05:00
Chris Hennes
8ef29190f4 Merge pull request #9629 from chennes/updateTranslations20230521
Update translations
2023-05-21 19:58:00 -05:00
Chris Hennes
20f073e84e Update translations 2023-05-21 19:13:11 -05:00
Chris Hennes
9d34bed01f Merge pull request #9628 from chennes/crowdInScriptTweak
Tools: Modify CrowdIn to only generate QMs when needed
2023-05-21 19:11:18 -05:00
Chris Hennes
b54e0d74ff Tools: Modify CrowdIn to only generate QMs when needed 2023-05-21 19:01:42 -05:00
Chris Hennes
e90ecc27ff Addon Manager: Minor error handling cleanup 2023-05-21 15:50:29 -05:00
wmayer
722087b32c OpenSCAD: Hull/Minkowski also work for a single selected object 2023-05-21 16:42:09 +02:00
Roy-043
52b41fee06 Draft: fix props_changed_placement_only for attached clones and similar (#9623)
For an attached object whose Shape depends on one or more source objects props_changed_placement_only should always return False.
2023-05-21 16:15:55 +02:00
Chris Hennes
864f99bf98 Merge pull request #9614 from chennes/fixPrefPageContext
Gui: Correct translation context of pref pages
2023-05-20 19:53:32 -05:00
MaxiV
4cfd56a80b Delete A4_IRAM4504.svg
It is included in the AR_IRAM folder
2023-05-20 10:31:00 -04:00
sliptonic
490ed09dc3 Merge pull request #9608 from chennes/pathHTMLRemoval
Path: Remove HTML where not needed
2023-05-20 07:51:57 -05:00
Roy-043
c5bf5d117b Draft: remove obsolete gui_array_simple.py (#9616) 2023-05-20 10:37:31 +02:00
Abdullah Tahiri
e7425e8634 Sketcher: Add App directory to pre-commit 2023-05-20 07:55:05 +02:00
Abdullah Tahiri
987b4bda2a Sketcher: App - Clang-format 2023-05-20 07:55:05 +02:00
Abdullah Tahiri
c33cdcd68a Sketcher: Add planeGCS directory to pre-commit 2023-05-20 07:55:05 +02:00
Abdullah Tahiri
2ae7cc4a94 Sketcher: PlaneGCS C-lang formatting
====================================

As per:
https://forum.freecad.org/viewtopic.php?t=77205

Please use pre-commit as described in:
https://github.com/FreeCAD/DevelopersHandbook/blob/master/gettingstarted/index.md#setting-up-for-development
2023-05-20 07:55:05 +02:00
Chris Hennes
5f82aa42bb Merge pull request #9215 from marioalexis84/gui-window_parameter
Gui: Add function in WindowParameter class to connect slot to ParameterManager signal
2023-05-19 22:45:48 -05:00
Chris Hennes
d30292bece Merge pull request #9603 from chennes/windowsVersionHack
Gui: Hack to get Windows 11 version
2023-05-19 21:12:19 -05:00
Chris Hennes
ad8a4376c8 Gui: Move C++ pref pages to QObject context 2023-05-19 20:54:27 -05:00
Chris Hennes
0100e8f843 Gui: Correct translation context of pref pages
Preference page title strings must be in QObject
2023-05-19 20:46:12 -05:00
Chris Hennes
4888a28f7d Merge pull request #9612 from chennes/addonmanagerVersionErrorHandling
Addon Manager: Improve error handling for Version
2023-05-19 18:08:14 -05:00
wandererfan
6a7b04a441 [TD]fix fail on bad selection (#9598) 2023-05-19 19:07:48 -04:00
wandererfan
766a04e26e [TD]cleanup debug messages 2023-05-19 19:07:48 -04:00
Chris Hennes
b0090a7890 Addon Manager: Improve error handling for Version 2023-05-19 17:17:29 -05:00
Chris Hennes
68ec11425d Gui: Hack to get Windows 11 version 2023-05-19 10:27:21 -05:00
Chris Hennes
e87555bdfb Merge pull request #9610 from chennes/openscadWordingTweak
OpenSCAD: Minor wording tweak in preferences
2023-05-19 10:25:29 -05:00
Chris Hennes
e2c85c9649 Merge pull request #9609 from chennes/addonManagerTranslationIssues20230518
Addon Manager: Minor linguistic fixes
2023-05-19 10:25:17 -05:00