Skip to content

Commit

Permalink
PartDesign: [skip ci] fixes #4276: Loading a project takes much more …
Browse files Browse the repository at this point in the history
…time compared to previous versions
  • Loading branch information
wwmayer committed Mar 2, 2020
1 parent b1a95ff commit a34cd69
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Mod/PartDesign/App/FeatureDressUp.cpp
Expand Up @@ -177,7 +177,12 @@ void DressUp::onChanged(const App::Property* prop)
BaseFeature.setValue (Base.getValue());
}
} else if (prop == &Shape || prop == &SupportTransform) {
if (!isRestoring() && !getDocument()->isPerformingTransaction()) {
// This is an expensive operation and to avoid to perform it unnecessarily it's not sufficient
// to check for the 'Restore' flag of the dress-up feature because at that time it's already reset.
// Instead the 'Restore' flag of the document must be checked.
// For more details see: https://forum.freecadweb.org/viewtopic.php?f=3&t=43799 (and issue 4276)
if (!getDocument()->testStatus(App::Document::Restoring) &&
!getDocument()->isPerformingTransaction()) {
Part::TopoShape s;
auto base = Base::freecad_dynamic_cast<FeatureAddSub>(getBaseObject(true));
if(!base) {
Expand Down

0 comments on commit a34cd69

Please sign in to comment.