* Core: Fixed a bug where an empty document disappears
Created a flag named autoCreated to distinguish an autoCreated
document created in the startup from a manually document.
Implemented a setter and a getter for this new flag.
Added a codition that verifies if a document is autoCreated
when opening another document to close it in the correct case.
Implemented unit tests for theses cases. Fixes#19868.
Signed-off-by: João Neves <joao.antonio.neves@tecnico.ulisboa.pt>
* Tests: Fix failing auto-created document tests
Signed-off-by: João Neves <joao.antonio.neves@tecnico.ulisboa.pt>
* Tests: moved created tests to the existing Document test framework.
Signed-off-by: João Neves <joao.antonio.neves@tecnico.ulisboa.pt>
---------
Signed-off-by: João Neves <joao.antonio.neves@tecnico.ulisboa.pt>
Fixes: Maintaining schemas is difficult and error-prone
- Facilitate easy schemas add, remove, change, etc.
- Remove 14 files containing approx 2,190 lines of if/else code and data
- Place data in one file (UnitsSchemasData.h) using a normalized structure (including special functions)
- Isolate and simplify data operations (code)
- Remove schemas enum to keep data independent of code
- Separate responsibilities: Specifications, data, schemas, schema
- Add schema data 'isDefault'
- Add schema data name
- Prefer algorithms to raw loops
- Add schemas unit tests
- Tweak quantity unit tests
Most of App::Origin is moved into this sub class of App::Origin.
Add App::Point. Change graphics of the planes/axis.
Remove scale-by-content behavior and make it fixed size on screen.
* Core: Add possibility for task dialogs to associate a view and be able to close when associated view is closed.
* TaskImage: Use task dialog view association.
* Sketcher: Use task dialog view association. Preventing crash (https://github.com/FreeCAD/FreeCAD/issues/16702)
* EditableDatumLabel: Use QPointer to prevent crash
The Qt6 (up to Qt 6.7.3 now) contains bug, which can lead, under
specific circumstances, to crash of the application, when the
MDI window is closed. The circumstances are:
* at least 2 MDI windows needs to be open
* stylesheet muset set different size (border, margin) for activated and un-activated tabBar tab
* the closed window must be inactive, but created before the window now active and open
* race condition must occur betwee the closing and resize event handlers for the tabBar
(see qt bug for details)
So this bug only occures with Qt6 with the Dark or Light styles selected (no classic) and only if
specific sequence of steps is followed during opening and closing the MDI windows.
The bug is in Qt code path executed when QMdiArea::ActivationHistoryOrder is set.
The other possible workaround might be to change all the affected stylesheets, but this seems to me
impractical and also fragile, because the affected code path will be still active.
https://bugreports.qt.io/browse/QTBUG-129596
* Fix importing .step file when user cancelled import settings dialog
* Refactor object loading python code, fix not using settings when STEP options dialog not shown
* Use custom exception type for user cancelling import instead of `RuntimeError`
* Pull python code out to external file
* Gui: Prepare for clang-format
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>