"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
Based on review comment, a small refactoring of code that was duplicated
when adding functionality to select documents. The duplication has been
removed in this commit.
This commit is in preparation for switching the old Add Property dialog
to the Add Property VarSet dialog. For now, this dialog does not handle
adding properties for multiple objects.
This patch fixes crashes that we've noticed during migration from Qt5 to
Qt6 in recent months.
If you select items in a tree in a specific direction or range (all, or
from bottom to top) and delete them, there is a high change user will
experience a crash in `testStatus` function. This problem arises because
we're getting into use-after-free situation.
Looking at the callstack there are a lot of calls to
`itemSelectionChanged` during deletion, which takes over item creation
after deletion in `TreeWidget::_slotDeleteObject`. This in turn causes
`DocumentObjectItem::testStatus` to be called prematurely when we have
dangling pointers in object map still. `itemSelectionChanged` signal is
being transmitted because the selection range is changing as we're
constantly deleting and readding certain items.
Previously there was `blockSelection` call during deletion, but it turns
out the signals can still be emitted even AFTER we delete the item. This
had to somehow change between Qt5 and Qt6. So, to be safe, move the
signal block for selection before the obj deletion loop to be sure we
won't retransmit this signal during an uncertain state.
Doing "Add dependent objects to selection" in the context menu of an
object that has cyclic dependencies triggered an infinite recursive
loop. This has been solved by using the function to get an outlist
recursively.
With this extension of the API, view providers can indicate whether
document objects should be able to be toggled for visibility. There is
both a C++ and Python interface, idiomatic for FreeCAD code.
* Add: barebone openFileLocation on linux
* Feat: Add handling for different types of os
* Fix: Use preprocessors
* Fix: directive typo
---------
Signed-off-by: Kaung Zin Hein <83657429+Zen-cronic@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.
In older versions it was possible to copy elements with drag and drop by holding the CTRL key. Since v0.20 or v0.21 this wasn't possible any
more so that elements are always moved.
Note: Copying is only allowed for elements that have a parent object.
The tree can change shape during handling the mousePressEvent() event,
because some part of the tree can be (un)folded. This might lead to
shift of the three (up or down). The position of items in tree change
relatively to the position of mouse (which stays in place).
If the visibility click is handled after mousePressEvent, the shift in
position can lead to cursor beeing over visibility icon and the click
is handled like if the visibility icon vas clicked, which is unexpected.
Handling the visibility click first fixes this. The setAccepted(true),
was removed, it is left to the subroutine to set it.
The gui texts for "Show description" and "Show internal name" were inconsistent.
"Show description column" -> "Show description"
"Show an extra tree view column for item description. -> "Show a description column for items."