========================================================
- CriticalMessage old signal is reconverted to new notification system. This enables to remove the obsolete old system.
- An example of how common errors can be provided with translation support is added, so that App notifications appear
translated in the NotificationArea.
Adds a few new Expression functions with the goal to:
- Simplify Placement, Rotation, Vector and Matrix object creation.
- Add new matrix functions for rotation and translation.
This mitigates the crash reported in issue #8749. The crash happens when
using Draft_Edit and using keyboard to enter a coordinate in Edit node
dialog. This change partially restores behaviour before commit fc14567,
after which FreeCADGui.Control.closeDialog and showDialog calls during
execution of DraftToolBar.editUi are no longer made using the todo.delay
mechanism. The crash can still be triggered by artificially slowing down key
event processing, so this is not a proper fix, just a mitigation.
* Add offset options to Draft PathArray
Allows user to specify a starting and ending offset to items in Draft PathArrays.
* [Draft] path array offset
---------
Co-authored-by: Roy-043 <info@b-k-g.nl>
- was reported and automatically fixed by Qt's Designer that the size in the file is incorrect, (the sum of the widget's widths is wider than the main widget's specified size)
=====================================================
In a previous commit the Edit Section and its preferences where removed, however
Adrián Insaurralde realised that the setting for showing or not this section had been left behind:
https://github.com/FreeCAD/FreeCAD/pull/8716#issuecomment-1462364487
This commit just removes that settings.
- was reported and automatically fixed by Qt's Designer that the size in the file is incorrect, (the sum of the widget's widths is wider than the main widget's specified size)
- vector must be initialized and vector size requires a const int
- also some sorting
- also some formatting changes to be consistent (either always "x." or "x.0")
Removal of unnecessary comparison.
`QThread::idealThreadCount()` returns the ideal number of threads that the process can run in parallel or 1 if it fails to determine it.
=======================================
Refactor:
- Substitute the use of variadic templates with parameter packs.
- Use recently incorporated external library "fmt" to handle printf like formating.
- Extensive cleaning of pragmas and unnecessary forward declarations.
- Parameter packs and libfmt provide a much stronger type checking now, so
conversions that are by standard implicit as bool to int need an explicit static_cast
to avoid compilation warnings.
Extension:
- Include a notifier field, so that the originator of the message can be provided. E.g. Document#DocumentObject
- Include a new type of message called CriticalMessage, this message is intended to have
special behaviour in the future. Namely, it will be used to notify forward compatilibity issues.
It will be used to substitute the current signal/slot mechanism.
- Include two new types of messages for user notifications (Notification and TranslatedNotification). This messages
will be use to convey UI notifications intended for the user (such as non-intrusive message about the usage of a tool). There
are two versions to mark whether the string provided as a message is already translated or not. When using the console system for
notifications, these notifications may originate from the App or the Gui. In the former, it is generally the case that the strings
of messages are not (yet) translated (but they can be marked with QT_TRANSLATE_NOOP). In the latter, often the messages to be provided
are already translated.
Python support for CriticalMessage, Notification and TranslatedNofification, including shortcuts:
Crt = FreeCAD.Console.PrintCritical
Ntf = FreeCAD.Console.PrintNotification
Tnf = FreeCAD.Console.PrintTranslatedNotification
This makes use of the recent additions to `TaskPanelPython` and
`UiLoader`, cf. #8602, to retranslate the UI without having to close and
reopen it again.
Retranslation of the part from the UI file is now handled by FreeCAD
internally, but the tool tips from the property descriptions still need
to be reassigned with the translated versions.