fixes 0003410: 0.17 Regression: recompute will make parts lose color and take a longer delay compared to FC0.16

This commit is contained in:
wmayer
2018-10-02 19:03:48 +02:00
parent b97b9f78e7
commit 7bf4c9d96f
10 changed files with 112 additions and 35 deletions

View File

@@ -2232,22 +2232,25 @@ int Document::recompute()
for (auto objIt = topoSortedObjects.rbegin(); objIt != topoSortedObjects.rend(); ++objIt){
// ask the object if it should be recomputed
if ((*objIt)->isTouched() || (*objIt)->mustExecute() == 1){
bool doRecompute = false;
if ((*objIt)->mustRecompute()) {
doRecompute = true;
objectCount++;
if (_recomputeFeature(*objIt)) {
// if something happened break execution of recompute
return -1;
}
else{
(*objIt)->purgeTouched();
// set all dependent object touched to force recompute
for (auto inObjIt : (*objIt)->getInList())
inObjIt->touch();
}
}
if ((*objIt)->isTouched() || doRecompute) {
(*objIt)->purgeTouched();
// force recompute of all dependent objects
for (auto inObjIt : (*objIt)->getInList())
inObjIt->enforceRecompute();
}
}
#ifdef FC_DEBUG
// check if all objects are recalculated which were thouched
// check if all objects are recalculated which were touched
for (auto objectIt : d->objectArray) {
if (objectIt->isTouched())
cerr << "Document::recompute(): " << objectIt->getNameInDocument() << " still touched after recompute" << endl;