As the title says, this is simple fix - basically right now anytime user
changed Link property to point to proper IFC type, we weren't writing to
the IFC file buffer to finally write it to the file if user would save
it.
So this patch makes sure we write to this buffer by calling appropriate
function, and making ifc object have proper pointer to IFC type.
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.
- Fix comment for mid-point
- Use in-class member initializers instead of constructor
- Remove redundant default constructor (got redundant after initializers)
- Made comments doxygen compatible
Regressed from previous behavior - there was Arch's refactor and the
base element that `SectionPlane` was inheriting from was
`App::FeaturePython`, not `Part::FeaturePython`. This changes a lot, since
`Part::FeaturePython` has predefined color (black in this case), which
later on - during property set of `SectionPlane` in properties caused
skipping of preferred setup of color.
* Add input hints to fillet and chamfer tools
* Add hints to trimming tool
* Add hints to splitting tool
* Implement hints for extend tool
* Add hints to external geometry
* Add hints to Carbon Copy tool
* Hint updates to align with developer guidelines
* change "click to set" to "set" per PR comments
* Use enum (or declare one) to be type safe per PR comments
* For "trivial" one-step / one-state tools, refactor with direct hint return rather than using declarative / table pattern.
* Refactor hint tables initializers with C++20 features per PR feedback
- Use designated initializers (.state = , .hints = ) for clearer structure
- Add 'using enum Gui::InputHint::UserInput' to eliminate repetitive prefixes
- Applied to DrawSketchHandlerExtend and DrawSketchHandlerFillet
* Refactor Splitting tool hint implementation with direct return (trivial) pattern
* For fillet change "vertex" to "point" per PR feedback
* Change hint to "pick location on edge to split" per PR feedback
Fixes the problem where if user has selected `Position and dimensions`
mode in Preferences, then after first keystroke on 2nd label after
typing something in 1st label before, the input is being accepted
without allowing them to enter a number with more than 2 digits.
Stupid mistake of mine from previous refactor - some of the OVPs do not
contain those elements and thus should not be accessed prematurely.
This patch moves access to the OVPs when it's actually needed so it
won't go out of bounds.
paddlestroke:
> Here we actually need to keep App::Origin. Because we do not allow deletion ONLY of origin objects. Not of normal LCS.
While the original code:
```cpp
auto origin = dynamic_cast<App::Origin*>(lcs);
if (origin && !origin->getInList().empty()) {
```
...handles this perfectly fine, intent isn't obvious when reading it.
Using `is<T>()` shows intent better and should avoid similar situations in the future.
* use early exit to highlight main execution path
* use `auto*` for pointer
* use getObject<T>() instead of casting result from getObject()
* remove empty updateData()
* rename origin to lcs in setTemporaryVisibility for clarity
As the title says. I think personally this increases readability just a
little bit and I thought it's low effort to refactor.
Instead of checking the OVPs through array everytime, since we access
them multiple times in different scenarios - just cache them on the
beginning of state and access the variable, instead of array.
This is a left-over of the regressions introduced with PR 18126.
Thanks to some moderinization of the code base and replacing static with dynamic casts undefined behaviour
has changed to well-defined behaviour but now unchecked null pointers.
This change does some extra null pointer checks and uses the now correct types for down casting.
Hint: Upstream still uses many static casts here that already cause undefined behaviour when creating a LCS.
This could be the reason for the possible crashes when deleting a LCS as described in 20261
# Conflicts:
# src/Gui/ViewProviderCoordinateSystem.cpp