-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PD: Fix crash when adding sketch to loft via tree view
The underlying problem is the method DocumentItem::updateItemSelection() where the selection is altered. This may cause the destruction and recreation of the DocumentObjectItems so that the passed pointer can become dangling. The issue is fixed in two steps: 1. Add the method 'DocumentObjectItem *findItem(App::DocumentObject* obj, const std::string& subname) const' to safely re-access the item. 2. Add a boolean flag 'dirtyFlag' and the methods insertItem() and removeItem() to DocumentObjectData. This is needed to check when the iterator over the container becomes invalid.
- Loading branch information
1 parent
92a9b30
commit 4ea1ad5
Showing
2 changed files
with
80 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters