When double-clicking a PartDesign Body inside an Assembly, the editing
context resolver failed to show PartDesign toolbars or a proper
breadcrumb. Three root causes:
1. Priority preemption: assembly.edit (priority 90) always matched
because the Assembly VP remained in edit mode, blocking all
PartDesign contexts (priorities 30-40).
2. Wrong active-object key: PartDesign matchers only queried the
"part" active object, but ViewProviderBody::toggleActiveBody()
sets "part" to the containing App::Part (which is the Assembly
itself). The Body is set under "pdbody", which was never queried.
3. Missing refresh trigger: ActiveObjectList::setObject() fires
Document::signalActivatedViewProvider, but EditingContextResolver
had no connection to it, so setActiveObject("pdbody", body) never
triggered a context re-resolve.
Changes:
- Forward signalActivatedViewProvider from Gui::Document to
Gui::Application (same pattern as signalInEdit/signalResetEdit)
- Connect EditingContextResolver to the new application-level signal
- Add getActivePdBodyObject() helper querying the "pdbody" key
- Add partdesign.in_assembly context (priority 95) that matches when
a Body is active pdbody while an Assembly is in edit
- Update partdesign.body and partdesign.feature matchers to check
pdbody before falling back to the part key
- Add Assembly > Body breadcrumb with Blue > Mauve coloring
- Update label resolution to prefer pdbody name
This is a hacky fix for https://github.com/FreeCAD/FreeCAD/issues/23607
Basically after widget is shown or polished we enforce it's minimum size to at
least cover the minimum size hint - something that QSS ignores if min-width is
specified.
In some configurations, Qt apparently defaults to giving the "first
acceptable" buffer format. This often ends up being RGB565, which
gives us little color resolution.
Request 8-bit RGB samples to fix this.
This tends to happen easiest with
`QT_WAYLAND_DISABLE_WINDOWDECORATION=1` and `QT_QPA_PLATFORM=wayland`.
On Wayland with Qt, the default OpenGL context often ends up being
OpenGL ES. ES is a stricter API based on the "core" profile and lacks
many legacy functions (e.g. glEnd). FreeCAD relies on some of these
functions, which work under Mesa’s permissive stack but fail outright
with NVIDIA’s proprietary drivers, resulting in a blank 3D view.
Fix this by explicitly requesting a desktop OpenGL compatibility
profile both before QApplication creation and in QuarterWidget. This
ensures the presence of the legacy entry points required by Coin/SoQt.
(NB: both requests appear to be necessary; a single change was not
sufficient in testing.)
"Professional CMake" book suggest the following:
"Targets should build successfully with or without compiler support for precompiled headers. It
should be considered an optimization, not a requirement. In particular, do not explicitly include a
precompile header (e.g. stdafx.h) in the source code, let CMake force-include an automatically
generated precompile header on the compiler command line instead. This is more portable across
the major compilers and is likely to be easier to maintain. It will also avoid warnings being
generated from certain code checking tools like iwyu (include what you use)."
Therefore, removed the "#include <PreCompiled.h>" from sources, also
there is no need for the "#ifdef _PreComp_" anymore
This creates logic that tries to load user parameters from file as the
priority and pushes back older mechanism to lower layer. Older way of
loading theme parameters should be preserved until we release first 1.1
RC.
This class aims to implement Design Token idea into FreeCAD themes. It
allows themes to use generic variables with generic values so we could
use one qss theme and change the style based on values from preference
packs.
This commit fixes how origin (coordinate system) indicator looks. Before
it showed as disc, and now it shows as point which is more approperiate
given the context.
* 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.