* 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
* Make some context menu actions translatable
* [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>
Every basic data type is stored in Base module, color is standing out as
one that does not. Moving it to Base opens possibilities to integrate it
better with the rest of FreeCAD.
* Fixes spelling of "Allow to" to "Allow one to"
and those variants:
Allows to -> Allows one to
allow to -> allow one to
allows to -> allows one to
* Fix "Let's -> Lets"
(and lower case variant.)
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update src/3rdParty/salomesmesh/inc/MED_Wrapper.hxx
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
* Update src/Base/PyObjectBase.cpp
Update src/App/ExtensionContainer.h
Update src/App/PropertyContainer.h
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
* Use gerund in user-facing texts.
* Use gerund for two more user-facing strings.
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
* Update src/Mod/Fem/App/FemMeshShapeNetgenObject.cpp
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
* Update src/Mod/Fem/App/FemMeshShapeNetgenObject.cpp
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
* Update src/Mod/Fem/App/FemMeshShapeNetgenObject.cpp
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
---------
Co-authored-by: Tobias Frost <tobi@debian.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>
* Add safe-mode which starts freecad in a clean environment
* Integrate safe-mode
* Show "(Safe Mode)" in main window title
* Show safe mode info when safe mode is started
* Created Safe Mode Icon
* Use new icon
* Add PreCompiled.h
* Add exports for windows
---------
Co-authored-by: Gabriel <gaz082@gmail.com>
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
This is big hack for Qt6 to force rendering using OpenGL from the
beginning. Since Qt6 OpenGL context is initialized only after creating
first QOpenGLWidget which results in window hiding and showing again
after some delay. This causes various timing issus as the window is not
supposed to do that.
This adds dragging support for toolbars placed in custom toolbar areas.
It is achived by creating our own custom ToolBar class that handles
logic of providing custom gripper. This is required because Qt hides
gripper when toolbar is not direct child of the main window which cannot
be overriden. Custom class should allow us to create more capable
toolbars in the future so it should be great addition on its own.
Co-Authored-By: Kacper Donat <kacper@kadet.net>
* cMake: Add base support for LibPack3
Minor changes to FreeCAD source code to support compiling with Qt 6.5 on MSVC,
and changes to cMake setup to support the new Libpack.
* NETGENPlugin: Fix compilation with MSVC and OCCT 7.8
* Material: Switch to Wrapped_ParseTupleAndKeywords for /fpermissive- on MSVC
* Base: Prevent accidental definition of MIN and MAX by MSVC
* cMake: Prevent accidentally finding an old LibPack
* Material: Wrap another ParseTuple call
* OCCT: Modify includes for 7.8.x
* Part: Change TNP code to use Wrapped_ParseTupleAndArgs
* Spreadsheet: Workaround for MSVC macro pollution
* Mesh: Workaround for MSVC macro pollution
* Base: Remove extra MSVC flag (moved to CMake)
* Tests: Fix compiling with /permissive-
* FEM: Fix Qt warnings about duplicate element names
* cMake: Ensure major version numbers are set
* Address review comments.
* cMake: Further tweaks for LibPack3
* cMake: Modify specification of compiler flags for MSVC
* Main: Remove QtQuick testing code
* cmake: Find Boost before SMESH (which uses it)
* Fixes for LibPack2
* cMake: Another try at importinhg VTK cleanly
* Gui: support toolbar drag and drop to status bar and menu bar
ClosesFreeCAD/FreeCAD#12979
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Gui: improve toolbar handling in status and menu bar
* Gui: fix workbench tab bar orientation in status or menu bar
* Gui: remove workbench toolbar position settings
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* fix hard crash in MainWindow::_updateActions() if no MDI view exists
* in MDIView::buildWindowTitle() use the label of the document because this changes when saving it while the name is immutable
* fix const correctness in MDIView::buildWindowTitle()
* do not set the modified flag of the main window in MDIView::buildWindowTitle() but in the calling instance
* move setting the main window title to Application::viewActivated to reduce code duplication
* fix missing application name if FreeCADGui is loaded as Python module