Skip to content

Commit

Permalink
Sketcher: Bug fix: Building Vertex Index on Restore
Browse files Browse the repository at this point in the history
===================================================

The bug was introduced by myself here:
47c0859

[code]
void SketchObject::onDocumentRestored()
 {
     try {
-        rebuildExternalGeometry();
+        if(Support.getValue()) {
+            validateExternalLinks();
+            rebuildExternalGeometry();
+        }
         Constraints.acceptGeometry(getCompleteGeometry());
     }
[/code]

The issue is that "rebuildExternalGeometry" calls "rebuildVertexIndex". So for any sketch not having external geometry, if you open it, select everything and hit del, you will have a crash because
I effectively removed the creation of the index in this dossier. You won't have one if you do anything rebuilding the index before hitting del, like creating geometry, though.
  • Loading branch information
abdullahtahiriyo authored and wwmayer committed Sep 28, 2015
1 parent 01ba165 commit 56c29e2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Mod/Sketcher/App/SketchObject.cpp
Expand Up @@ -3727,6 +3727,9 @@ void SketchObject::onDocumentRestored()
validateExternalLinks();
rebuildExternalGeometry();
}
else {
rebuildVertexIndex();
}
Constraints.acceptGeometry(getCompleteGeometry());
}
catch (...) {
Expand Down

0 comments on commit 56c29e2

Please sign in to comment.